@@ -7,6 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive
77
88# Install fresh Python and dependencies for build-from-source
99RUN apt-get update && apt-get install -y software-properties-common
10+ RUN apt-get install -y git
1011RUN add-apt-repository ppa:deadsnakes/ppa
1112RUN apt install -y python3.11
1213RUN apt install -y libpython3.11-dev
@@ -18,18 +19,19 @@ RUN apt install -y python3-pip
1819RUN apt-get install -y libjpeg8-dev zlib1g-dev libffi-dev libgl1
1920# fix pip version because of weird PyYAML issue
2021RUN python3.11 -m pip install --upgrade pip
22+ RUN python3.11 -m pip install uv
2123# EXPLICITLY install cpu versions of torch/torchvision (not all versions have +cpu modes on PyPI...)
22- 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
23- RUN python3.11 -m pip install openvino-dev opencv-python-headless
24+ 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
25+ RUN uv pip install openvino-dev opencv-python-headless --system
2426
2527# Do some dependency installation separately here to make layer caching more efficient
2628COPY ./setup.py ./setup.py
2729RUN python3.11 -c "from setup import requirements; file = open('requirements.txt', 'w'); file.writelines([req + '\n' for req in requirements]); file.close()" \
28- && python3.11 -m pip install -r ./requirements.txt
30+ && uv pip install -r ./requirements.txt --system
2931
3032COPY . /GaNDLF
3133WORKDIR /GaNDLF
32- RUN python3.11 -m pip install -e .
34+ RUN uv pip install -e . --system
3335# Entrypoint forces all commands given via "docker run" to go through python, CMD forces the default entrypoint script argument to be gandlf run
3436# If a user calls "docker run gandlf:[tag] anonymize", it will resolve to running "gandlf anonymize" instead.
3537# CMD is inherently overridden by args to "docker run", entrypoint is constant.
0 commit comments