Skip to content

Commit eaa732d

Browse files
Merge branch 'release-0.9.1' into feat/custom-cell-timeout
2 parents 96bcdb9 + 7cb7688 commit eaa732d

File tree

91 files changed

+3384
-865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+3384
-865
lines changed

.github/workflows/action_main.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,33 @@ jobs:
3030
id: changeDirsStep
3131
uses: tj-actions/changed-files@v46
3232
with:
33-
dir_names: true
33+
dir_names: true # this only outputs directory names
3434
files: |
3535
**/*
3636
*
37+
38+
- name: Check if Dockerfile changed
39+
id: changeDockerfileStep
40+
uses: tj-actions/changed-files@v46
41+
with:
42+
files: Dockerfile
43+
44+
3745
- id: outputStep
38-
run: echo "::set-output name=changeDirs::${{ steps.changeDirsStep.outputs.all_changed_files }}"
46+
run: |
47+
{
48+
echo "changeDirs=${{ steps.changeDirsStep.outputs.all_changed_files }}";
49+
echo "changeDockerfile=${{ steps.changeDockerfileStep.outputs.any_changed }}"
50+
} >> "$GITHUB_OUTPUT"
3951
4052
# ON CHANGED FILES
4153
build_grader-service:
4254
uses: ./.github/workflows/build.yml
4355
needs: init
44-
if: contains(needs.init.outputs.changeDirs, 'grader_service') || contains(needs.init.outputs.changeDirs, '.github/workflows') || contains(needs.init.outputs.changeDirs, 'Dockerfile')
56+
if: |
57+
contains(needs.init.outputs.changeDirs, 'grader_service') ||
58+
contains(needs.init.outputs.changeDirs, '.github/workflows') ||
59+
needs.init.outputs.changeDockerfile == 'true'
4560
4661
dockerize_grader-service:
4762
needs: build_grader-service

.gitlab-ci.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/source/admin/system_architecture.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,10 @@ and handle the evaluation of user submissions, such as running notebooks for gra
114114
Auto-grading is accomplished using the `grader_service.convert` submodule, which can be executed as a command-line interface (CLI).
115115
Different executors are available to manage this:
116116
- **LocalAutogradeExecutor**: Executes the module directly within the current Python process on the worker by importing the package and invoking the converters.
117-
- **LocalProcessAutogradeExecutor**: Runs the submodule in a separate process.
117+
- **LocalAutogradeProcessExecutor**: Runs the submodule in a separate process.
118118
- **KubeAutogradeExecutor**: Spawns a Kubernetes pod to run the submodule. This is the only approach that allows different images for lectures, as the grading code must be executed in the same environment as the lecture.
119119

120120

121121
# How To Scale
122122

123123
[//]: # (TODO: what is the minimal setup? what is the most sophisticated setup)
124-

docs/source/installation/docker.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the containers together with their services.
1717

1818
Run the following command:
1919
```bash
20-
DATABASE_TYPE=sqlite docker compose up --build -d
20+
docker compose up --build -d
2121
```
2222

2323
This command builds the images and starts the containers in detached mode. It sets SQLite as its database that is integrated in `Grader Service`.
@@ -43,5 +43,3 @@ To stop and remove the containers, run:
4343
```bash
4444
docker compose -f docker-compose.yml -f docker-compose-postgres.yml down -v
4545
```
46-
47-
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
FROM postgres
22

3-
# Install git
3+
# Install python
44
RUN apt-get update && \
5-
apt-get install -y python3 python3-venv && \
5+
apt-get install -y python3 && \
66
apt-get clean && \
77
rm -rf /var/lib/apt/lists/*
88

9+
# Install uv
10+
COPY --from=ghcr.io/astral-sh/uv:0.9.3 /uv /uvx /bin/
11+
912
WORKDIR /app
1013

11-
# Copy necessary files and folders
14+
# Install python dependencies, only copying necessary files
1215
COPY ./pyproject.toml MANIFEST.in ./
13-
COPY ./grader_service ./grader_service
14-
# Create a virtual environment
15-
RUN python3 -m venv /venv
16+
RUN --mount=type=cache,target=/root/.cache/uv \
17+
uv sync --no-install-project --link-mode=copy
1618

17-
# Activate venv and install the package
18-
RUN /venv/bin/pip install .
19+
# Copy the project files and install the package itself
20+
COPY ./grader_service ./grader_service
21+
RUN --mount=type=cache,target=/root/.cache/uv \
22+
uv pip install --link-mode=copy .
1923

20-
CMD ["sh", "-c", "/app/init-db.sh"]
24+
CMD ["sh", "-c", "/app/init-db-postgres.sh"]

examples/docker_compose/Dockerfile-Hub

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ RUN apt-get update && \
66
apt-get clean && \
77
rm -rf /var/lib/apt/lists/*
88

9+
# Install uv
10+
COPY --from=ghcr.io/astral-sh/uv:0.9.3 /uv /uvx /bin/
11+
912
WORKDIR /app
1013

1114
ENV JUPYTERHUB_CRYPT_KEY=e3f92a0d5e37446c7e894a2ef6c6ec3bcb4aa3c38d2a442eb567adf780597aa0
1215

13-
RUN pip install grader_labextension
14-
15-
RUN python3 -m pip install dockerspawner oauthenticator
16+
RUN --mount=type=cache,target=/root/.cache/uv \
17+
uv pip install grader_labextension dockerspawner oauthenticator
1618

17-
CMD ["jupyterhub", "-f", "/app/jupyterhub_config.py"]
19+
CMD ["jupyterhub", "-f", "/app/jupyterhub_config.py"]

examples/docker_compose/Dockerfile-Service

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
FROM python:3.13-slim
22

3-
# Install git
3+
# Install git and sqlite
44
RUN apt-get update && \
5-
apt-get install -y git && \
5+
apt-get install -y git sqlite3 && \
66
apt-get clean && \
77
rm -rf /var/lib/apt/lists/*
88

9+
# Install uv
10+
COPY --from=ghcr.io/astral-sh/uv:0.9.3 /uv /uvx /bin/
11+
ENV UV_SYSTEM_PYTHON=true
12+
913
WORKDIR /app
1014

11-
# Copy necessary files and folders
15+
# Install python dependencies, only copying necessary files
1216
COPY ./pyproject.toml MANIFEST.in ./
13-
COPY ./grader_service ./grader_service
17+
RUN --mount=type=cache,target=/root/.cache/uv \
18+
uv sync --no-install-project
1419

15-
RUN pip install .
16-
RUN pip install numpy ipykernel
20+
# Copy the project files and install only the package itself
21+
COPY ./grader_service ./grader_service
22+
RUN --mount=type=cache,target=/root/.cache/uv \
23+
uv pip install --link-mode=copy -e .
1724

1825
# Set default branch to main and default user
1926
RUN git config --global init.defaultBranch main && \

examples/docker_compose/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ the containers together with their services.
1616

1717
Run the following command:
1818
```bash
19-
DATABASE_TYPE=sqlite docker compose up --build -d
19+
docker compose up --build -d
2020
```
2121

2222
This command builds the images and starts the containers in detached mode. It sets SQLite as its database that is integrated in `Grader Service`.
@@ -42,5 +42,3 @@ To stop and remove the containers, run:
4242
```bash
4343
docker compose -f docker-compose.yml -f docker-compose-postgres.yml down -v
4444
```
45-
46-

0 commit comments

Comments
 (0)