From 0fa8f9833e5fa476d40d910eae62e57a90942a2e Mon Sep 17 00:00:00 2001 From: Arthur Zucker Date: Tue, 30 Apr 2024 16:54:24 +0200 Subject: [PATCH] nit? [push-ci-image] --- docker/examples-tf.dockerfile | 3 +-- docker/tf-light.dockerfile | 8 +++----- docker/torch-light.dockerfile | 9 +++++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/docker/examples-tf.dockerfile b/docker/examples-tf.dockerfile index ea9b400514b53e..7ae2e1a70aa291 100644 --- a/docker/examples-tf.dockerfile +++ b/docker/examples-tf.dockerfile @@ -7,8 +7,7 @@ ENV VIRTUAL_ENV=/usr/local RUN pip --no-cache-dir install uv RUN uv venv RUN uv pip install --no-cache-dir -U pip setuptools -RUN uv pip install --no-cache-dir "fsspec>=2023.5.0,<2023.10.0" seqeval -RUN uv pip install --no-cache-dir "transformers[flax,testing,sentencepiece,vision]" +RUN uv pip install --no-cache-dir "transformers[flax,testing,sentencepiece,vision]" seqeval RUN pip uninstall -y transformers diff --git a/docker/tf-light.dockerfile b/docker/tf-light.dockerfile index c7dc3277b3c0c3..e0e5f33845e532 100644 --- a/docker/tf-light.dockerfile +++ b/docker/tf-light.dockerfile @@ -1,14 +1,12 @@ FROM python:3.10-slim ENV PYTHONDONTWRITEBYTECODE=1 USER root -RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git -RUN apt-get install -y cmake g++ +RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git cmake g++ ENV VIRTUAL_ENV=/usr/local RUN pip --no-cache-dir install uv RUN uv venv -RUN uv pip install --no-cache-dir -U pip setuptools -RUN uv pip install --no-cache-dir "pytest<8.0.1" "fsspec>=2023.5.0,<2023.10.0" pytest-subtests pytest-xdist +RUN uv pip install --no-cache-dir -U pip setuptools tensorflow_probability +# RUN uv pip install --no-cache-dir "pytest<8.0.1" "fsspec>=2023.5.0,<2023.10.0" RUN uv pip install --upgrade --no-cache-dir "transformers[sklearn,tf-cpu,testing,sentencepiece,tf-speech,vision]" -RUN uv pip install --no-cache-dir --upgrade tensorflow_probability RUN apt-get clean && rm -rf /var/lib/apt/lists/* RUN apt remove -y cmake \ No newline at end of file diff --git a/docker/torch-light.dockerfile b/docker/torch-light.dockerfile index 4727ea4f0749fa..061bbdc9e40e75 100644 --- a/docker/torch-light.dockerfile +++ b/docker/torch-light.dockerfile @@ -1,12 +1,13 @@ FROM python:3.10-slim ENV PYTHONDONTWRITEBYTECODE=1 USER root -RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-dev espeak-ng time git g++ cmake && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-dev espeak-ng time git g++ cmake ENV VIRTUAL_ENV=/usr/local RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools RUN pip install --no-cache-dir 'torch' 'torchvision' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install accelerate --extra-index-url https://download.pytorch.org/whl/cpu -RUN uv pip install --no-cache-dir soundfile librosa "fsspec>=2023.5.0,<2023.10.0" "transformers[sklearn,sentencepiece,vision,timm,testing]" -RUN pip uninstall -y transformers && apt-get clean || apt-get -y --purge remove "*nvidia*" || apt-get autoremove || apt-get autoclean +RUN uv pip install --no-cache-dir soundfile librosa "fsspec>=2023.5.0,<2023.10.0" "transformers[sklearn,sentencepiece,vision,testing]" +RUN pip uninstall -y transformers && apt-get clean RUN pip cache remove "nvidia-*" || pip uninstall -y `pip freeze | grep "nvidia-*"` || pip uninstall -y `pip freeze | grep "triton-*"` || pip cache remove triton || true -RUN rm -rf /usr/local/lib/python3.10/site-packages/nvidia \ No newline at end of file +RUN rm -rf /usr/local/lib/python3.10/site-packages/nvidia +RUN rm -rf /usr/local/lib/python3.10/site-packages/triton \ No newline at end of file