Skip to content

Commit b6a73fb

Browse files
authored
Merge pull request #747 from szmazurek/master
Upgrade base PyTorch version
2 parents 3ef60ff + 3fcfe84 commit b6a73fb

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

.devcontainer/onCreateCommand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ pip install wheel
55
pip install openvino-dev==2023.0.1 # [OPTIONAL] to generate optimized models for inference
66
pip install mlcube_docker # [OPTIONAL] to deploy GaNDLF models as MLCube-compliant Docker containers
77
pip install medmnist==2.1.0
8-
pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
8+
pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu

.devcontainer/postCreateCommand.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# if runnning on a GPU machine, install the GPU version of pytorch
77
if command -v nvidia-smi &> /dev/null
88
then
9-
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
9+
pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
1010
fi
1111

1212
pip install -e .

.github/workflows/docker-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
fail-fast: false # So that remaining jobs don't instantly quit if one fails (e.g, CPU/ROCm don't upload if CUDA just fails to push to ghcr...)
2626
matrix:
2727
include: # Platform locates Dockerfile ("Dockerfile-{PLATFORM}"), docker tag has to be all lowercase alphanumeric for mysterious docker reasons
28-
- platform: CUDA11.6
29-
dockertag: cuda116
28+
- platform: CUDA11.8
29+
dockertag: cuda118
3030
- platform: CPU
3131
dockertag: cpu
3232
# - platform: ROCm

.github/workflows/mlcube-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
python -m pip install --upgrade pip
7474
python -m pip install wheel
7575
python -m pip install openvino-dev==2023.0.1 mlcube_docker
76-
pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
76+
pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu
7777
pip install -e .
7878
- name: Run mlcube deploy tests
7979
working-directory: ./testing

.github/workflows/openfl-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
sudo apt-get install libvips libvips-tools -y
7474
python -m pip install --upgrade pip
7575
python -m pip install wheel
76-
pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
76+
pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu
7777
pip install -e .
7878
- name: Run generic unit tests to download data and construct CSVs
7979
if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change

.github/workflows/python-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
python -m pip install --upgrade pip
7575
python -m pip install wheel
7676
python -m pip install openvino-dev==2023.0.1 mlcube_docker
77-
pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
77+
pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu
7878
pip install -e .
7979
- name: Run generic unit tests
8080
if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change

Dockerfile-CPU

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN add-apt-repository ppa:deadsnakes/ppa
99
RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1
1010
RUN python3.9 -m pip install --upgrade pip
1111
# EXPLICITLY install cpu versions of torch/torchvision (not all versions have +cpu modes on PyPI...)
12-
RUN python3.9 -m pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
12+
RUN python3.9 -m pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu
1313
RUN python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker
1414

1515
# Do some dependency installation separately here to make layer caching more efficient

Dockerfile-CUDA11.6 renamed to Dockerfile-CUDA11.8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nvidia/cuda:11.6.2-devel-ubuntu20.04
1+
FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
22
LABEL github="https://github.com/mlcommons/GaNDLF"
33
LABEL docs="https://mlcommons.github.io/GaNDLF/"
44
LABEL version=1.0
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y software-properties-common
1212
RUN add-apt-repository ppa:deadsnakes/ppa
1313
RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1
1414
RUN python3.9 -m pip install --upgrade pip
15-
RUN python3.9 -m pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
15+
RUN python3.9 -m pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
1616
RUN python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker
1717

1818
# Do some dependency installation separately here to make layer caching more efficient

Dockerfile-ROCm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rocm/pytorch:rocm5.2.3_ubuntu20.04_py3.7_pytorch_1.12.1
1+
FROM rocm/pytorch:rocm5.6_ubuntu20.04_py3.8_pytorch_1.12.1
22
LABEL github="https://github.com/mlcommons/GaNDLF"
33
LABEL docs="https://mlcommons.github.io/GaNDLF/"
44
LABEL version=1.0
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y software-properties-common
1010
RUN add-apt-repository ppa:deadsnakes/ppa
1111
RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1
1212
RUN python3.9 -m pip install --upgrade pip
13-
RUN python3.9 -m pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2
13+
RUN python3.9 -m pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/rocm5.6
1414
RUN python3.9 -m pip install --upgrade pip && python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker
1515
RUN apt-get update && apt-get install -y libgl1
1616

docs/setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ GaNDLF's primary computational foundation is built on PyTorch, and as such it su
3030
(venv_gandlf) $> ### subsequent commands go here
3131
### PyTorch installation - https://pytorch.org/get-started/previous-versions/#v1131
3232
## CUDA 11.6
33-
# (venv_gandlf) $> pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
33+
# (venv_gandlf) $> pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118
3434
## ROCm
35-
# (venv_gandlf) $> pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/rocm5.2
35+
# (venv_gandlf) $> pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/rocm5.6
3636
## CPU-only
37-
# (venv_gandlf) $> pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cpu
37+
# (venv_gandlf) $> pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --extra-index-url https://download.pytorch.org/whl/cpu
3838
```
3939

4040
### Optional Dependencies

mlcube/model_mlcube/mlcube.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ docker:
3030
# Docker build context relative to $MLCUBE_ROOT. (gandlf_deploy can handle this automatically.)
3131
build_context: "../"
3232
# Docker file name within docker build context. Any "Dockerfile-*" in the GaNDLF source repo is valid.
33-
build_file: "Dockerfile-CUDA11.6"
33+
build_file: "Dockerfile-CUDA11.8"
3434

3535
# These settings should be set by global MLCube configuration, generally not per-deployment.
3636
# However, some sane defaults (for Docker >19.03) are here:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def run(self):
8181

8282

8383
requirements = [
84-
"torch==1.13.1",
84+
"torch==2.1.0",
8585
"black==23.11.0",
8686
"numpy==1.25.0",
8787
"scipy",

0 commit comments

Comments
 (0)