Skip to content

Commit 04bafcb

Browse files
authored
move to uv in the Dockerfiles. (huggingface#7094)
move to uv in the Dockerfiles.
1 parent 7081a25 commit 04bafcb

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

docker/diffusers-flax-cpu/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ ENV PATH="/opt/venv/bin:$PATH"
2323

2424
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
2525
# follow the instructions here: https://cloud.google.com/tpu/docs/run-in-container#train_a_jax_model_in_a_docker_container
26-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
27-
python3 -m pip install --upgrade --no-cache-dir \
26+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
27+
python3 -m uv pip install --upgrade --no-cache-dir \
2828
clu \
2929
"jax[cpu]>=0.2.16,!=0.3.2" \
3030
"flax>=0.4.1" \
3131
"jaxlib>=0.1.65" && \
32-
python3 -m pip install --no-cache-dir \
32+
python3 -m uv pip install --no-cache-dir \
3333
accelerate \
3434
datasets \
3535
hf-doc-builder \

docker/diffusers-flax-tpu/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ ENV PATH="/opt/venv/bin:$PATH"
2323

2424
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
2525
# follow the instructions here: https://cloud.google.com/tpu/docs/run-in-container#train_a_jax_model_in_a_docker_container
26-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
27-
python3 -m pip install --no-cache-dir \
26+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
27+
python3 -m uv pip install --no-cache-dir \
2828
"jax[tpu]>=0.2.16,!=0.3.2" \
2929
-f https://storage.googleapis.com/jax-releases/libtpu_releases.html && \
30-
python3 -m pip install --upgrade --no-cache-dir \
30+
python3 -m uv pip install --upgrade --no-cache-dir \
3131
clu \
3232
"flax>=0.4.1" \
3333
"jaxlib>=0.1.65" && \
34-
python3 -m pip install --no-cache-dir \
34+
python3 -m uv pip install --no-cache-dir \
3535
accelerate \
3636
datasets \
3737
hf-doc-builder \

docker/diffusers-onnxruntime-cpu/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ RUN python3 -m venv /opt/venv
2222
ENV PATH="/opt/venv/bin:$PATH"
2323

2424
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
25-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
26-
python3 -m pip install --no-cache-dir \
25+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
26+
python3 -m uv pip install --no-cache-dir \
2727
torch==2.1.2 \
2828
torchvision==0.16.2 \
2929
torchaudio==2.1.2 \
3030
onnxruntime \
3131
--extra-index-url https://download.pytorch.org/whl/cpu && \
32-
python3 -m pip install --no-cache-dir \
32+
python3 -m uv pip install --no-cache-dir \
3333
accelerate \
3434
datasets \
3535
hf-doc-builder \

docker/diffusers-onnxruntime-cuda/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ RUN python3 -m venv /opt/venv
2222
ENV PATH="/opt/venv/bin:$PATH"
2323

2424
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
25-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
26-
python3 -m pip install --no-cache-dir \
25+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
26+
python3 -m uv pip install --no-cache-dir \
2727
torch==2.1.2 \
2828
torchvision==0.16.2 \
2929
torchaudio==2.1.2 \
3030
"onnxruntime-gpu>=1.13.1" \
3131
--extra-index-url https://download.pytorch.org/whl/cu117 && \
32-
python3 -m pip install --no-cache-dir \
32+
python3 -m uv pip install --no-cache-dir \
3333
accelerate \
3434
datasets \
3535
hf-doc-builder \

docker/diffusers-pytorch-compile-cuda/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ RUN python3.9 -m venv /opt/venv
2424
ENV PATH="/opt/venv/bin:$PATH"
2525

2626
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
27-
RUN python3.9 -m pip install --no-cache-dir --upgrade pip && \
28-
python3.9 -m pip install --no-cache-dir \
27+
RUN python3.9 -m pip install --no-cache-dir --upgrade pip uv && \
28+
python3.9 -m uv pip install --no-cache-dir \
2929
torch \
3030
torchvision \
3131
torchaudio \

docker/diffusers-pytorch-cpu/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ RUN python3 -m venv /opt/venv
2323
ENV PATH="/opt/venv/bin:$PATH"
2424

2525
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
26-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
27-
python3 -m pip install --no-cache-dir \
26+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
27+
python3 -m uv pip install --no-cache-dir \
2828
torch \
2929
torchvision \
3030
torchaudio \
3131
invisible_watermark \
3232
--extra-index-url https://download.pytorch.org/whl/cpu && \
33-
python3 -m pip install --no-cache-dir \
33+
python3 -m uv pip install --no-cache-dir \
3434
accelerate \
3535
datasets \
3636
hf-doc-builder \

docker/diffusers-pytorch-cuda/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ RUN python3 -m venv /opt/venv
2323
ENV PATH="/opt/venv/bin:$PATH"
2424

2525
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
26-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
27-
python3 -m pip install --no-cache-dir \
26+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
27+
python3 -m uv pip install --no-cache-dir \
2828
torch \
2929
torchvision \
3030
torchaudio \

docker/diffusers-pytorch-xformers-cuda/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ RUN python3 -m venv /opt/venv
2323
ENV PATH="/opt/venv/bin:$PATH"
2424

2525
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py)
26-
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
26+
RUN python3 -m pip install --no-cache-dir --upgrade pip uv && \
2727
python3 -m pip install --no-cache-dir \
2828
torch \
2929
torchvision \
3030
torchaudio \
3131
invisible_watermark && \
32-
python3 -m pip install --no-cache-dir \
32+
python3 -m uv pip install --no-cache-dir \
3333
accelerate \
3434
datasets \
3535
hf-doc-builder \

0 commit comments

Comments
 (0)