Skip to content

Commit 67ae376

Browse files
rebuild with full uv
1 parent a671a9e commit 67ae376

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

tensorflow/training/docker/2.19/py3/Dockerfile.cpu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSIO
130130
&& make install \
131131
&& rm -rf ../Python-$PYTHON_VERSION*
132132

133+
RUN ${PIP} --no-cache-dir install --upgrade \
134+
pip \
135+
setuptools
136+
133137
# Install UV for faster package installation
134138
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
135139
ENV PATH="/root/.cargo/bin:${PATH}"
136140

137-
RUN uv pip install --system --no-cache-dir \
138-
pip \
139-
setuptools
140-
141141
# Some TF tools expect a "python" binary
142142
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
143143
&& ln -s $(which ${PIP}) /usr/bin/pip

tensorflow/training/docker/2.19/py3/cu125/Dockerfile.gpu

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ RUN ${PIP} --no-cache-dir install --upgrade \
196196
"setuptools>=81" \
197197
wheel
198198

199+
# Install UV for faster package installation
200+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
201+
ENV PATH="/root/.cargo/bin:${PATH}"
202+
199203
# Some TF tools expect a "python" binary
200204
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
201205
&& ln -s $(which ${PIP}) /usr/bin/pip
@@ -269,7 +273,7 @@ FROM common AS ec2
269273

270274
ARG TF_URL
271275

272-
RUN ${PIP} install --no-cache-dir -U \
276+
RUN uv pip install --system --no-cache-dir \
273277
${TF_URL} \
274278
"tensorflow-io==0.37.*" \
275279
tensorflow-datasets
@@ -315,10 +319,6 @@ ARG TF_URL
315319
# sagemaker-specific environment variable
316320
ENV SAGEMAKER_TRAINING_MODULE sagemaker_tensorflow_container.training:main
317321

318-
# Install UV for faster package installation
319-
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
320-
ENV PATH="/root/.cargo/bin:${PATH}"
321-
322322
# https://github.com/yaml/pyyaml/issues/601
323323
# PyYaml less than 6.0.1 failes to build with cython v3 and above.
324324
# tf-models-official uses older versions, breaking the install.
@@ -346,9 +346,8 @@ RUN uv pip install --system --no-cache-dir \
346346
&& uv pip install --system --no-cache-dir \
347347
${TF_URL} \
348348
"tensorflow-io==0.37.*" \
349-
tensorflow-datasets
350-
351-
# Rust/cargo already installed with UV
349+
tensorflow-datasets \
350+
&& rm -rf /root/.cache/uv /root/.cargo/registry
352351

353352
RUN uv pip install --system --no-cache-dir \
354353
numba \
@@ -357,7 +356,8 @@ RUN uv pip install --system --no-cache-dir \
357356
"opencv-python==4.11.0.86" \
358357
plotly \
359358
seaborn \
360-
shap
359+
shap \
360+
&& rm -rf /root/.cache/uv
361361

362362
RUN uv pip install --system --no-cache-dir \
363363
sagemaker \
@@ -368,7 +368,8 @@ RUN uv pip install --system --no-cache-dir \
368368
sagemaker-studio-analytics-extension \
369369
sparkmagic==0.22.0 \
370370
sagemaker-studio-sparkmagic-lib \
371-
smclarify
371+
smclarify \
372+
&& rm -rf /root/.cache/uv
372373

373374
# Re-pin numpy after all installs to ensure TF compatibility
374375
RUN uv pip install --system --no-cache-dir "numpy==1.26.4"

0 commit comments

Comments
 (0)