diff --git a/.devcontainer/onCreateCommand.sh b/.devcontainer/onCreateCommand.sh index bd69500a8..fe14726b0 100755 --- a/.devcontainer/onCreateCommand.sh +++ b/.devcontainer/onCreateCommand.sh @@ -5,4 +5,4 @@ pip install wheel pip install openvino-dev==2023.0.1 # [OPTIONAL] to generate optimized models for inference pip install mlcube_docker # [OPTIONAL] to deploy GaNDLF models as MLCube-compliant Docker containers pip install medmnist==2.1.0 -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 +pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index e938ebaa8..fc79af237 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -6,7 +6,7 @@ # if runnning on a GPU machine, install the GPU version of pytorch if command -v nvidia-smi &> /dev/null then - 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 + pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 fi pip install -e . diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e7b67070e..92c5cde27 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -25,8 +25,8 @@ jobs: 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...) matrix: include: # Platform locates Dockerfile ("Dockerfile-{PLATFORM}"), docker tag has to be all lowercase alphanumeric for mysterious docker reasons - - platform: CUDA11.6 - dockertag: cuda116 + - platform: CUDA11.8 + dockertag: cuda118 - platform: CPU dockertag: cpu # - platform: ROCm diff --git a/.github/workflows/mlcube-test.yml b/.github/workflows/mlcube-test.yml index 1c5b3e58c..5b7294dd1 100644 --- a/.github/workflows/mlcube-test.yml +++ b/.github/workflows/mlcube-test.yml @@ -73,7 +73,7 @@ jobs: python -m pip install --upgrade pip python -m pip install wheel python -m pip install openvino-dev==2023.0.1 mlcube_docker - 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 + pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu pip install -e . - name: Run mlcube deploy tests working-directory: ./testing diff --git a/.github/workflows/openfl-test.yml b/.github/workflows/openfl-test.yml index 99db48023..78867aadf 100644 --- a/.github/workflows/openfl-test.yml +++ b/.github/workflows/openfl-test.yml @@ -73,7 +73,7 @@ jobs: sudo apt-get install libvips libvips-tools -y python -m pip install --upgrade pip python -m pip install wheel - 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 + pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu pip install -e . - name: Run generic unit tests to download data and construct CSVs if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index efbabbdd9..1cb4cf254 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -74,7 +74,7 @@ jobs: python -m pip install --upgrade pip python -m pip install wheel python -m pip install openvino-dev==2023.0.1 mlcube_docker - 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 + pip install torch==2.1.0+cpu torchvision==0.16.0+cpu torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cpu pip install -e . - name: Run generic unit tests if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change diff --git a/Dockerfile-CPU b/Dockerfile-CPU index 0120f2af1..d06cc003a 100644 --- a/Dockerfile-CPU +++ b/Dockerfile-CPU @@ -9,7 +9,7 @@ RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1 RUN python3.9 -m pip install --upgrade pip # EXPLICITLY install cpu versions of torch/torchvision (not all versions have +cpu modes on PyPI...) -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 +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 RUN python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker # Do some dependency installation separately here to make layer caching more efficient diff --git a/Dockerfile-CUDA11.6 b/Dockerfile-CUDA11.8 similarity index 92% rename from Dockerfile-CUDA11.6 rename to Dockerfile-CUDA11.8 index db052592e..d8eb30b1a 100644 --- a/Dockerfile-CUDA11.6 +++ b/Dockerfile-CUDA11.8 @@ -1,4 +1,4 @@ -FROM nvidia/cuda:11.6.2-devel-ubuntu20.04 +FROM nvidia/cuda:11.8.0-devel-ubuntu20.04 LABEL github="https://github.com/mlcommons/GaNDLF" LABEL docs="https://mlcommons.github.io/GaNDLF/" LABEL version=1.0 @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1 RUN python3.9 -m pip install --upgrade pip -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 +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 RUN python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker # Do some dependency installation separately here to make layer caching more efficient diff --git a/Dockerfile-ROCm b/Dockerfile-ROCm index 9bbdaaa2b..81c0b04b3 100644 --- a/Dockerfile-ROCm +++ b/Dockerfile-ROCm @@ -1,4 +1,4 @@ -FROM rocm/pytorch:rocm5.2.3_ubuntu20.04_py3.7_pytorch_1.12.1 +FROM rocm/pytorch:rocm5.6_ubuntu20.04_py3.8_pytorch_1.12.1 LABEL github="https://github.com/mlcommons/GaNDLF" LABEL docs="https://mlcommons.github.io/GaNDLF/" LABEL version=1.0 @@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y python3.9 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.9-dev libffi-dev libgl1 RUN python3.9 -m pip install --upgrade pip -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 +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 RUN python3.9 -m pip install --upgrade pip && python3.9 -m pip install openvino-dev==2023.0.1 opencv-python-headless mlcube_docker RUN apt-get update && apt-get install -y libgl1 diff --git a/docs/setup.md b/docs/setup.md index ac860a59e..c55bda9ad 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -30,11 +30,11 @@ GaNDLF's primary computational foundation is built on PyTorch, and as such it su (venv_gandlf) $> ### subsequent commands go here ### PyTorch installation - https://pytorch.org/get-started/previous-versions/#v210 ## CUDA 11.6 -# (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 +# (venv_gandlf) $> pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu118 ## ROCm -# (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 +# (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 ## CPU-only -# (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 +# (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 ``` ### Optional Dependencies diff --git a/mlcube/model_mlcube/mlcube.yaml b/mlcube/model_mlcube/mlcube.yaml index 1d3704be7..a2cddab5a 100644 --- a/mlcube/model_mlcube/mlcube.yaml +++ b/mlcube/model_mlcube/mlcube.yaml @@ -30,7 +30,7 @@ docker: # Docker build context relative to $MLCUBE_ROOT. (gandlf_deploy can handle this automatically.) build_context: "../" # Docker file name within docker build context. Any "Dockerfile-*" in the GaNDLF source repo is valid. - build_file: "Dockerfile-CUDA11.6" + build_file: "Dockerfile-CUDA11.8" # These settings should be set by global MLCube configuration, generally not per-deployment. # However, some sane defaults (for Docker >19.03) are here: diff --git a/setup.py b/setup.py index 4b01240a7..4e02b6e79 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,7 @@ def run(self): requirements = [ - "torch==1.13.1", + "torch==2.1.0", "black==23.11.0", "numpy==1.25.0", "scipy",