Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .spelling/.spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
^\QGANDLF/grad_clipping/__init__.py\E$
^\QGANDLF/models/seg_modules/__init__.py\E$
^\QGANDLF/privacy/__init__.py\E$
^\QGANDLF/configuration/__init__.py\E$
^\Qtesting/__init__.py\E$
^\Qsetup.py\E$
^\Qtutorials/classification_medmnist_notebook/tutorial.ipynb\E$
^samples/images_opm/
^tutorials/classification_medmnist_notebook/medmnist/dataset/
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile-CPU
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive

# Install fresh Python and dependencies for build-from-source
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-get install -y git
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.11
RUN apt install -y libpython3.11-dev
Expand All @@ -18,18 +19,19 @@ RUN apt install -y python3-pip
RUN apt-get install -y libjpeg8-dev zlib1g-dev libffi-dev libgl1
# fix pip version because of weird PyYAML issue
RUN python3.11 -m pip install --upgrade pip
RUN python3.11 -m pip install uv
# EXPLICITLY install cpu versions of torch/torchvision (not all versions have +cpu modes on PyPI...)
RUN python3.11 -m pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cpu
RUN python3.11 -m pip install openvino-dev opencv-python-headless
RUN uv pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cpu --system
RUN uv pip install openvino-dev opencv-python-headless --system

# Do some dependency installation separately here to make layer caching more efficient
COPY ./setup.py ./setup.py
RUN python3.11 -c "from setup import requirements; file = open('requirements.txt', 'w'); file.writelines([req + '\n' for req in requirements]); file.close()" \
&& python3.11 -m pip install -r ./requirements.txt
&& uv pip install -r ./requirements.txt --system

COPY . /GaNDLF
WORKDIR /GaNDLF
RUN python3.11 -m pip install -e .
RUN uv pip install -e . --system
# Entrypoint forces all commands given via "docker run" to go through python, CMD forces the default entrypoint script argument to be gandlf run
# If a user calls "docker run gandlf:[tag] anonymize", it will resolve to running "gandlf anonymize" instead.
# CMD is inherently overridden by args to "docker run", entrypoint is constant.
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile-CUDA11.8
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive

# Explicitly install python3.11 (this uses 11.1 for now, as PyTorch LTS 1.8.2 is built against it)
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-get install -y git
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.11
RUN apt install -y libpython3.11-dev
Expand All @@ -21,17 +22,18 @@ RUN apt install -y python3-pip
RUN apt-get install -y libjpeg8-dev zlib1g-dev libffi-dev libgl1
# fix pip version because of weird PyYAML issue
RUN python3.11 -m pip install --upgrade pip
RUN python3.11 -m pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118
RUN python3.11 -m pip install openvino-dev opencv-python-headless
RUN python3.11 -m pip install uv
RUN uv pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu118 --system
RUN uv pip install openvino-dev opencv-python-headless --system

# Do some dependency installation separately here to make layer caching more efficient
COPY ./setup.py ./setup.py
RUN python3.11 -c "from setup import requirements; file = open('requirements.txt', 'w'); file.writelines([req + '\n' for req in requirements]); file.close()" \
&& python3.11 -m pip install -r ./requirements.txt
&& uv pip install -r ./requirements.txt --system

COPY . /GaNDLF
WORKDIR /GaNDLF
RUN python3.11 -m pip install -e .
RUN uv pip install -e . --system

# Entrypoint forces all commands given via "docker run" to go through python, CMD forces the default entrypoint script argument to be gandlf run
# If a user calls "docker run gandlf:[tag] anonymize", it will resolve to running "gandlf anonymize" instead.
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile-CUDA12.6
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive

# Explicitly install python3.11 (this uses 11.1 for now, as PyTorch LTS 1.8.2 is built against it)
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-get install -y git
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.11
RUN apt install -y libpython3.11-dev
Expand All @@ -21,17 +22,18 @@ RUN apt install -y python3-pip
RUN apt-get install -y libjpeg8-dev zlib1g-dev libffi-dev libgl1
# fix pip version because of weird PyYAML issue
RUN python3.11 -m pip install --upgrade pip
RUN python3.11 -m pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126
RUN python3.11 -m pip install openvino-dev opencv-python-headless
RUN python3.11 -m pip install uv
RUN uv pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126 --system
RUN uv pip install openvino-dev opencv-python-headless --system

# Do some dependency installation separately here to make layer caching more efficient
COPY ./setup.py ./setup.py
RUN python3.11 -c "from setup import requirements; file = open('requirements.txt', 'w'); file.writelines([req + '\n' for req in requirements]); file.close()" \
&& python3.11 -m pip install -r ./requirements.txt
&& uv pip install -r ./requirements.txt --system

COPY . /GaNDLF
WORKDIR /GaNDLF
RUN python3.11 -m pip install -e .
RUN uv pip install -e . --system

# Entrypoint forces all commands given via "docker run" to go through python, CMD forces the default entrypoint script argument to be gandlf run
# If a user calls "docker run gandlf:[tag] anonymize", it will resolve to running "gandlf anonymize" instead.
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile-ROCm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LABEL version=1.0

# The base image contains ROCm, python 3.9 and pytorch already, no need to install those
RUN apt-get update && apt-get install -y software-properties-common
RUN apt-get install -y git
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.11
RUN apt install -y libpython3.11-dev
Expand All @@ -19,17 +20,18 @@ RUN apt install -y python3-pip
RUN apt-get install -y python3.11 python3-pip libjpeg8-dev zlib1g-dev python3-dev libpython3.11-dev libffi-dev libgl1
# fix pip version because of weird PyYAML issue
RUN python3.11 -m pip install --upgrade pip
RUN python3.11 -m pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/rocm6.3
RUN python3.11 -m pip install openvino-dev opencv-python-headless
RUN python3.11 -m pip install uv
RUN uv pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/rocm6.3 --system
RUN uv pip install openvino-dev opencv-python-headless --system

# Do some dependency installation separately here to make layer caching more efficient
COPY ./setup.py ./setup.py
RUN python3.11 -c "from setup import requirements; file = open('requirements.txt', 'w'); file.writelines([req + '\n' for req in requirements]); file.close()" \
&& python3.11 -m pip install -r ./requirements.txt
&& uv pip install -r ./requirements.txt --system

COPY . /GaNDLF
WORKDIR /GaNDLF
RUN python3.11 -m pip install -e .
RUN uv pip install -e . --system

# Entrypoint forces all commands given via "docker run" to go through python, CMD forces the default entrypoint script argument to be gandlf run
# If a user calls "docker run gandlf:[tag] anonymize", it will resolve to running "gandlf anonymize" instead.
Expand Down
Loading