Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1

jobs:
test:
Expand Down Expand Up @@ -92,7 +92,6 @@ jobs:
path: dockerLogs/

workflows:
version: 2
build_and_test:
jobs:
- test
10 changes: 8 additions & 2 deletions .github/workflows/build_cw_image-prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: build_CW_docker_image_master
on:
workflow_dispatch:
push:
tags:
- '*'
Expand All @@ -13,7 +14,7 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Build Image
- name: Build Image with Codabench Version as tag
run: docker build -t codalab/codabench-compute-worker:${{ github.ref_name }} -f packaging/container/Containerfile.compute_worker .
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -22,7 +23,12 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image with prod release tag
run: docker push codalab/codabench-compute-worker:${{ github.ref_name }}
- name: Change tag to latest
- name: Change tag to latest and push
run: |
docker tag codalab/codabench-compute-worker:${{ github.ref_name }} codalab/codabench-compute-worker:latest
docker push codalab/codabench-compute-worker:latest
- name: Change tag to prod release tag + date for CVEs versioning and push
run: |
NOW=$(date "+%Y-%m-%dT%H-%M-%S")
docker tag codalab/codabench-compute-worker:latest codalab/codabench-compute-worker:${{ github.ref_name }}-${NOW}
docker push codalab/codabench-compute-worker:${{ github.ref_name }}-${NOW}
6 changes: 4 additions & 2 deletions .github/workflows/image_scan.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: scan_image_for_CVE
on:
workflow_dispatch:
# Every day at 00:00
schedule:
- cron: "0 0 * * *"
- cron: "0 0 * * *"

jobs:
scan_image:
name: Scan compute worker image with Trivy
Expand All @@ -14,6 +16,6 @@ jobs:
image-ref: 'codalab/codabench-compute-worker:latest'
format: 'table'
exit-code: '1'
pkg-types: 'os,library'
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
scanners: 'vuln'
119 changes: 58 additions & 61 deletions compute_worker/uv.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ USE_GPU=True
!!! note
Starting from `codalab/competitions-v2-compute-worker:v1.22` the images are now unifed for Podman and Docker CPU/GPU and has been renamed to `codalab/codabench-compute-worker:latest`

Run the compute worker container :

```bash
Create a `run_podman.sh` file with the following content:

```bash title="run_podman.sh"
podman run -d \
--volume /run/user/$(id -u)/podman/podman.sock:/run/user/1000/podman/podman.sock:U \
--env-file .env \
Expand All @@ -103,6 +104,18 @@ podman run -d \
codalab/codabench-compute-worker:latest
```

Then run the command :

```bash
chmod +x run_podman.sh
```

And start the compute worker container :

```bash
./run_podman.sh
```

!!! warning
To launch a Podman compatible GPU worker, you will need to have podman version 5.4.2 minimum

Expand Down
52 changes: 26 additions & 26 deletions documentation/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions packaging/container/Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM almalinux:10-minimal
FROM almalinux:10-minimal AS builder

RUN microdnf install -y tar gzip
RUN microdnf update -y --nodocs && microdnf install -y tar gzip && microdnf clean all

FROM scratch

COPY --from=builder / /

ENV PYTHONUNBUFFERED=1

Expand Down
8 changes: 6 additions & 2 deletions packaging/container/Containerfile.compute_worker
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM almalinux:10-minimal
FROM almalinux:10-minimal AS builder

RUN microdnf install -y tar gzip
RUN microdnf update -y --nodocs && microdnf install -y tar gzip && microdnf clean all

FROM scratch

COPY --from=builder / /

# This makes output not buffer and return immediately, nice for seeing results in stdout
ENV PYTHONUNBUFFERED=1
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ classifiers = [
"Programming Language :: Python :: 3.10",
]
dependencies = [
"django==5.2.14",
"django==5.2.15",
"django-oauth-toolkit==1.6.3",
"social-auth-core==4.8.5",
"social-auth-app-django==5.6.0",
"django-extensions==4.1.0",
"channels==4.3.2",
"channels-redis==4.0.0",
"pillow==12.2.0",
"pillow==12.3.0",
"celery==5.6.2",
"gunicorn==23.0",
"urllib3==2.7.0",
Expand Down Expand Up @@ -51,7 +51,7 @@ dependencies = [
"flex==6.14.1",
"pyrabbit2==1.0.7",
"django-enforce-host==1.1.0",
"twisted==25.5.0",
"twisted==26.4.0",
"ipdb==0.13.13",
"jinja2==3.1.6",
"requests==2.33.1",
Expand All @@ -61,7 +61,7 @@ dependencies = [
"drf-spectacular>=0.28.0,<0.29",
"loguru>=0.7.3,<0.8",
"tzdata>=2025.3",
"setuptools==82.0.0",
"setuptools==83.0.0",
"pytz>=2025.2",
"django-filter==25.1",
"django-cors-headers==4.9.0",
Expand All @@ -83,7 +83,7 @@ dev = [
"django-querycount==0.7.0",
"django-debug-toolbar==6.2.0",
"flake8==7.3.0",
"pytest==9.0.3",
"pytest==9.1.1",
"pytest-django==4.12.0",
]
[tool.pytest.ini_options]
Expand Down
2 changes: 1 addition & 1 deletion tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = "==3.14.0"
dependencies = [
"loguru~=0.7.3",
"psycopg[binary]~=3.2.13",
"pytest==9.0.2",
"pytest==9.1.1",
"pytest-playwright~=0.7.1",
"pytest-xdist~=3.8.0",
"toml~=0.10.2",
Expand Down
Loading
Loading