Skip to content

Commit

Permalink
[push-ci-image]
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Apr 30, 2024
1 parent 582720e commit dc16067
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# Ensure running with CircleCI/huggingface
check_circleci_user:
docker:
- image: python:3.11-slim
- image: python:3.10-slim
parallelism: 1
steps:
- run: echo $CIRCLE_PROJECT_USERNAME
Expand Down
4 changes: 2 additions & 2 deletions .circleci/create_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def to_dict(self):
{"attach_workspace": {"at": "~/transformers/test_preparation"}},
]
steps.extend([{"run": l} for l in self.install_steps])
steps.append({"run": {"name": "Show installed libraries and their versions", "command": """du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distutils_hack|__pycache__" | sort -h | tail -10 | tee installed.txt || true"""}})
steps.append({"run": {"name": "Show installed libraries and their versions", "command": """du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distutils_hack|__pycache__" | sort -h | tee installed.txt || true"""}})
steps.append({"run":{"name":"Show biggest libraries","command":"""dpkg-query --show --showformat='${Installed-Size}\t${Package}\n' | sort -rh | head -25 | sort -h | awk '{ printf("%.5f GB %s\\n",$1/1024/1024, $2)}' || true"""}})
steps.append({"store_artifacts": {"path": "~/transformers/installed.txt"}})

Expand All @@ -120,7 +120,7 @@ def to_dict(self):
test_command = ""
if self.command_timeout:
test_command = f"timeout {self.command_timeout} "
test_command += f"python3 -m pytest -rsfE -p no:warnings -vvv --continue-on-collection-errors --junitxml=test-results/junit.xml -n {self.pytest_num_workers} " + " ".join(pytest_flags)
test_command += f"python3 -m pytest -rsfE -p no:warnings --tb=line --junitxml=test-results/junit.xml -n {self.pytest_num_workers} " + " ".join(pytest_flags)

if self.parallelism == 1:
if self.tests_to_run is None:
Expand Down
3 changes: 2 additions & 1 deletion docker/consistency.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y time git pkg-config make
Expand All @@ -9,6 +9,7 @@ RUN uv pip install --no-cache-dir -U pip setuptools GitPython
RUN uv pip install --no-cache --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir tensorflow-cpu tf-keras
RUN uv pip install --no-cache-dir "transformers[flax,quality,vision,testing]"
RUN git lfs install

# Cleanup to reduce the size of the docker
RUN pip cache remove "nvidia-*" || true
Expand Down
2 changes: 1 addition & 1 deletion docker/custom-tokenizers.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand Down
4 changes: 2 additions & 2 deletions docker/examples-tf.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand All @@ -7,7 +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 "fsspec>=2023.5.0,<2023.10.0" seqeval
RUN uv pip install --no-cache-dir "transformers[flax,testing,sentencepiece,vision]"


Expand Down
4 changes: 2 additions & 2 deletions docker/examples-torch.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ RUN apt-get install -y g++ cmake
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
RUN uv pip install --no-cache-dir "fsspec>=2023.5.0,<2023.10.0" seqeval
RUN pip install --no-cache-dir 'torch' 'torchvision' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir "transformers[sklearn,torch,testing,sentencepiece,vision,timm]"

Expand Down
2 changes: 1 addition & 1 deletion docker/exotic-models.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand Down
6 changes: 4 additions & 2 deletions docker/hub.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y time git pkg-config make
Expand All @@ -7,8 +7,10 @@ RUN pip install uv
RUN uv venv
RUN uv pip install --no-cache-dir -U pip setuptools GitPython
RUN uv pip install --no-cache --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir tensorflow-cpu tf-keras accelerate
RUN python3 -m pip install --no-cache-dir accelerate[testing,test_trackers] --extra-index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir tensorflow-cpu tf-keras
RUN uv pip install --no-cache-dir "transformers[flax,quality,vision,testing]"
RUN git lfs install

# Cleanup to reduce the size of the docker
RUN pip cache remove "nvidia-*" || true
Expand Down
4 changes: 2 additions & 2 deletions docker/jax-light.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand All @@ -7,7 +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"
RUN uv pip install --no-cache-dir "fsspec>=2023.5.0,<2023.10.0" scipy
RUN uv pip install --no-cache-dir "transformers[flax,testing,sentencepiece,flax-speech,vision]"


Expand Down
2 changes: 1 addition & 1 deletion docker/pipeline-tf.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand Down
2 changes: 1 addition & 1 deletion docker/quality.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand Down
2 changes: 1 addition & 1 deletion docker/tf-light.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
USER root
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
Expand Down
2 changes: 1 addition & 1 deletion docker/torch-light.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-de
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-cache-dir accelerate soundfile "fsspec>=2023.5.0,<2023.10.0" "transformers[sklearn,sentencepiece,vision,timm,testing]"
RUN uv pip install --no-cache-dir accelerate 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 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
2 changes: 1 addition & 1 deletion docker/torch-tf-light.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV VIRTUAL_ENV=/usr/local
RUN pip install uv
RUN uv venv
RUN uv pip install --no-cache-dir -U pip setuptools

RUN git lfs install

RUN pip install --no-cache-dir 'torch' 'torchvision' 'torchaudio' --index-url https://download.pytorch.org/whl/cpu
RUN uv pip install --no-cache-dir pypi-kenlm protobuf==3.20.3 accelerate tensorflow_probability pytest pytest-xdist parameterized
Expand Down

0 comments on commit dc16067

Please sign in to comment.