Skip to content

Commit 711966a

Browse files
committed
update python and pip package versions
1 parent 744b2ff commit 711966a

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-slim
1+
FROM python:3.12-slim
22
ARG task_type
33

44
ENV TASK_TYPE=$task_type
@@ -18,7 +18,7 @@ ENV PATH="/home/algorithm/.local/bin:${PATH}"
1818
RUN python -m pip install --user -U pip
1919

2020
COPY --chown=algorithm:algorithm requirements.txt /opt/algorithm/
21-
RUN python -m pip install --user -rrequirements.txt
21+
RUN python -m pip install --user -r requirements.txt
2222

2323
COPY --chown=algorithm:algorithm .env /opt/algorithm/
2424
COPY --chown=algorithm:algorithm process.py /opt/algorithm/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ With this template, you can submit your algorithm (with minimal effort) to the t
8080

8181
### Dependencies
8282

83-
For building the algorithm for submission, the user should have access to Docker [https://docs.docker.com/] on their system. (Note: Submissions to the test phase are allowed only with docker containers). This algorithm template was tested using Ubuntu 20.04.6 and Docker 23.0.4.
83+
For building the algorithm for submission, the user should have access to Docker [https://docs.docker.com/] on their system. (Note: Submissions to the test phase are allowed only with docker containers). This algorithm template was tested using Ubuntu 24.04 and Docker 28.1.1.
8484

8585
Please make sure to list the requirements for your algorithm in the `requirements.txt` file as this will be picked up when building the docker container.
8686

requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
21
evalutils==0.3.1
32
SimpleITK
4-
scikit-learn==0.24.2
5-
# torch # Uncomment if you want to use PyTorch
3+
scikit-learn
4+
#torch # Uncomment if you want to use PyTorch
65
numpy
7-
scipy==1.6.3
8-
python-dotenv==1.0.0
6+
scipy
7+
python-dotenv

test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ docker run --rm \
2424

2525
docker run --rm \
2626
-v synthrad_algorithm-output-$VOLUME_SUFFIX:/output/ \
27-
python:3.9-slim cat /output/results.json | python -m json.tool
27+
python:3.12-slim cat /output/results.json | python3 -m json.tool
2828

2929
docker run --rm \
3030
-v $SCRIPTPATH/test:/input \
3131
-v synthrad_algorithm-output-$VOLUME_SUFFIX:/output/ \
32-
python:3.9-slim python -c "import json, sys; f1 = json.load(open('/output/results.json')); f2 = json.load(open('/input/expected_output.json')); sys.exit(f1 != f2);"
32+
python:3.12-slim python -c "import json, sys; f1 = json.load(open('/output/results.json')); f2 = json.load(open('/input/expected_output.json')); sys.exit(f1 != f2);"
3333

3434
if [ $? -eq 0 ]; then
3535
echo "Tests successfully passed..."

test_gpu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ docker run --rm \
2525

2626
docker run --rm \
2727
-v synthrad_algorithm-output-$VOLUME_SUFFIX:/output/ \
28-
python:3.9-slim cat /output/results.json | python -m json.tool
28+
python:3.12-slim cat /output/results.json | python3 -m json.tool
2929

3030
docker run --rm \
3131
-v $SCRIPTPATH/test:/input \
3232
-v synthrad_algorithm-output-$VOLUME_SUFFIX:/output/ \
33-
python:3.9-slim python -c "import json, sys; f1 = json.load(open('/output/results.json')); f2 = json.load(open('/input/expected_output.json')); sys.exit(f1 != f2);"
33+
python:3.12-slim python -c "import json, sys; f1 = json.load(open('/output/results.json')); f2 = json.load(open('/input/expected_output.json')); sys.exit(f1 != f2);"
3434

3535
if [ $? -eq 0 ]; then
3636
echo "Tests successfully passed..."

0 commit comments

Comments
 (0)