From bc0af168f7bf6e2a1242e79cba6ff6840f6d74fa Mon Sep 17 00:00:00 2001 From: Arthur Zucker Date: Tue, 21 May 2024 16:06:50 +0200 Subject: [PATCH] [build-ci-image] --- docker/jax-light.dockerfile | 3 ++- docker/pipeline-tf.dockerfile | 3 ++- docker/pipeline-torch.dockerfile | 2 +- docker/tf-light.dockerfile | 2 +- docker/torch-jax-light.dockerfile | 2 +- docker/torch-light.dockerfile | 2 +- setup.py | 2 +- src/transformers/dependency_versions_table.py | 2 +- 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docker/jax-light.dockerfile b/docker/jax-light.dockerfile index 838333062839e8..d9ca5948f9d25c 100644 --- a/docker/jax-light.dockerfile +++ b/docker/jax-light.dockerfile @@ -1,9 +1,10 @@ FROM python:3.10-slim ENV PYTHONDONTWRITEBYTECODE=1 +ARG REF=main USER root RUN apt-get update && apt-get install -y 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 "scipy<1.13" "transformers[flax,testing,sentencepiece,flax-speech,vision]" +RUN pip install --no-cache-dir "scipy<1.13" "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[flax,testing,sentencepiece,flax-speech,vision]" RUN pip uninstall -y transformers RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove && apt-get autoclean \ No newline at end of file diff --git a/docker/pipeline-tf.dockerfile b/docker/pipeline-tf.dockerfile index 81af0ea9c15b91..3c83a254c662d9 100644 --- a/docker/pipeline-tf.dockerfile +++ b/docker/pipeline-tf.dockerfile @@ -1,9 +1,10 @@ FROM python:3.10-slim ENV PYTHONDONTWRITEBYTECODE=1 +ARG REF=main USER root 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 && uv venv && uv pip install --no-cache-dir -U pip setuptools -RUN pip install --no-cache-dir "transformers[sklearn,tf-cpu,testing,sentencepiece,tf-speech,vision]" +RUN pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,tf-cpu,testing,sentencepiece,tf-speech,vision]" RUN uv pip install --no-cache-dir "protobuf==3.20.3" tensorflow_probability RUN apt-get clean && rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/docker/pipeline-torch.dockerfile b/docker/pipeline-torch.dockerfile index 554d9783144232..e31f832ddbf825 100644 --- a/docker/pipeline-torch.dockerfile +++ b/docker/pipeline-torch.dockerfile @@ -6,5 +6,5 @@ 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 --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu -RUN uv pip install --no-cache-dir librosa "transformers[sklearn,sentencepiece,vision,testing]" +RUN uv pip install --no-cache-dir librosa "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,sentencepiece,vision,testing]" RUN pip uninstall -y transformers \ No newline at end of file diff --git a/docker/tf-light.dockerfile b/docker/tf-light.dockerfile index 23dcd40db2094b..ff0d3ddafefb9a 100644 --- a/docker/tf-light.dockerfile +++ b/docker/tf-light.dockerfile @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-de RUN apt-get install -y 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 --upgrade --no-cache-dir "transformers[tf-cpu,sklearn,testing,sentencepiece,tf-speech,vision]" +RUN pip install --upgrade --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[tf-cpu,sklearn,testing,sentencepiece,tf-speech,vision]" RUN uv pip install --no-cache-dir "protobuf==3.20.3" RUN pip uninstall -y transformers RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove && apt-get autoclean \ No newline at end of file diff --git a/docker/torch-jax-light.dockerfile b/docker/torch-jax-light.dockerfile index ef28563ec102ba..a5bd963fb955ea 100644 --- a/docker/torch-jax-light.dockerfile +++ b/docker/torch-jax-light.dockerfile @@ -6,7 +6,7 @@ ENV VIRTUAL_ENV=/usr/local RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools RUN uv pip install --no-deps accelerate RUN pip install --no-cache-dir 'torch' 'torchvision' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu -RUN pip install --no-cache-dir "scipy<1.13" "transformers[flax, audio, sklearn,sentencepiece,vision,testing]" +RUN pip install --no-cache-dir "scipy<1.13" "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[flax, audio, sklearn,sentencepiece,vision,testing]" # RUN pip install --no-cache-dir "scipy<1.13" "transformers[flax,testing,sentencepiece,flax-speech,vision]" diff --git a/docker/torch-light.dockerfile b/docker/torch-light.dockerfile index 2172d66ca8a769..0d24c1cfcf45e9 100644 --- a/docker/torch-light.dockerfile +++ b/docker/torch-light.dockerfile @@ -6,5 +6,5 @@ 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 --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu -RUN uv pip install --no-cache-dir librosa "transformers[sklearn,sentencepiece,vision,testing]" +RUN uv pip install --no-cache-dir librosa "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,sentencepiece,vision,testing]" RUN pip uninstall -y transformers \ No newline at end of file diff --git a/setup.py b/setup.py index d134b2edcbc4e7..94359a3491d8fc 100644 --- a/setup.py +++ b/setup.py @@ -175,7 +175,7 @@ "tensorflow-probability<2.16", "tf2onnx", "timeout-decorator", - "timm", + "timm<=0.9.16", "tokenizers>=0.19,<0.20", "torch", "torchaudio", diff --git a/src/transformers/dependency_versions_table.py b/src/transformers/dependency_versions_table.py index 94fac3a484dcaa..488dfe80ba7d6c 100644 --- a/src/transformers/dependency_versions_table.py +++ b/src/transformers/dependency_versions_table.py @@ -80,7 +80,7 @@ "tensorflow-probability": "tensorflow-probability<2.16", "tf2onnx": "tf2onnx", "timeout-decorator": "timeout-decorator", - "timm": "timm", + "timm": "timm<=0.9.16", "tokenizers": "tokenizers>=0.19,<0.20", "torch": "torch", "torchaudio": "torchaudio",