Skip to content

Commit

Permalink
installation instructions updated from official page
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakpati committed Mar 16, 2023
1 parent 26080f7 commit 844b918
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install openvino-dev==2022.1.0 mlcube_docker
pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
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 -e .
- name: Run generic unit tests
if: steps.changed-files-specific.outputs.only_modified == 'false' # Run on any non-docs change
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-CPU
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL version=1.0
RUN apt-get update && apt-get install -y python3.8 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.8-dev libffi-dev libgl1
RUN python3.8 -m pip install --upgrade pip
# EXPLICITLY install cpu versions of torch/torchvision (not all versions have +cpu modes on PyPI...)
RUN python3.8 -m pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
RUN python3.8 -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.8 -m pip install openvino-dev==2022.1.0 opencv-python-headless mlcube_docker

# Do some dependency installation separately here to make layer caching more efficient
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-CUDA11.6
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LABEL version=1.0
# Explicitly install python3.8 (this uses 11.1 for now, as PyTorch LTS 1.8.2 is built against it)
RUN apt-get update && apt-get install -y python3.8 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.8-dev libffi-dev libgl1
RUN python3.8 -m pip install --upgrade pip
RUN python3.8 -m pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
RUN python3.8 -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.8 -m pip install openvino-dev==2022.1.0 opencv-python-headless mlcube_docker

# Do some dependency installation separately here to make layer caching more efficient
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-ROCm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL version=1.0

# The base image contains ROCm, python 3.8 and pytorch already, no need to install those
RUN python3 -m pip install --upgrade pip
RUN python3.8 -m pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.2
RUN python3.8 -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 -m pip install --upgrade pip && python3 -m pip install openvino-dev==2022.1.0 opencv-python-headless mlcube_docker
RUN apt-get update && apt-get install -y libgl1

Expand Down
6 changes: 4 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ conda create -n venv_gandlf python=3.8 -y
conda activate venv_gandlf
### PyTorch installation - https://pytorch.org/get-started/locally
## CUDA 11.6
# pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
# 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
## ROCm
# 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
## CPU-only
# python3.8 -m pip install torch==1.13.1+cpu torchvision==0.14.1+cpu torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
# 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 openvino-dev==2022.1.0 # [OPTIONAL] to generate optimized models for inference
pip install mlcube_docker # [OPTIONAL] to deploy GaNDLF models as MLCube-compliant Docker containers
pip install -e .
Expand Down

0 comments on commit 844b918

Please sign in to comment.