From 688d31fa4570eecbff10fc29aef7612d10a66ef5 Mon Sep 17 00:00:00 2001 From: Arthur Zucker Date: Thu, 2 May 2024 11:16:45 +0200 Subject: [PATCH] [push-ci-image] --- docker/custom-tokenizers.dockerfile | 12 ++++++------ docker/exotic-models.dockerfile | 12 +++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docker/custom-tokenizers.dockerfile b/docker/custom-tokenizers.dockerfile index 76ea3e84a1ed86..6d1124ed329606 100644 --- a/docker/custom-tokenizers.dockerfile +++ b/docker/custom-tokenizers.dockerfile @@ -1,18 +1,18 @@ 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 update && apt-get install -y libsndfile1-dev espeak-ng time git cmake wget xz-utils build-essential g++5 libprotobuf-dev protobuf-compiler ENV VIRTUAL_ENV=/usr/local RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools -RUN apt-get update && apt-get install -y cmake wget xz-utils build-essential g++5 libprotobuf-dev protobuf-compiler -RUN wget https://github.com/ku-nlp/jumanpp/releases/download/v2.0.0-rc4/jumanpp-2.0.0-rc4.tar.xz -RUN tar xvf jumanpp-2.0.0-rc4.tar.xz -RUN mkdir jumanpp-2.0.0-rc4/bld -WORKDIR ./jumanpp-2.0.0-rc4/bld +RUN wget https://github.com/ku-nlp/jumanpp/releases/download/v2.0.0-rc3/jumanpp-2.0.0-rc3.tar.xz +RUN tar xvf jumanpp-2.0.0-rc3.tar.xz +RUN mkdir jumanpp-2.0.0-rc3/bld +WORKDIR ./jumanpp-2.0.0-rc3/bld RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local RUN make install + RUN uv pip install --no-cache --upgrade 'torch' --index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir --no-deps accelerate --extra-index-url https://download.pytorch.org/whl/cpu RUN uv pip install --no-cache-dir "transformers[ja,testing,sentencepiece,jieba,spacy,ftfy,rjieba]" unidic unidic-lite diff --git a/docker/exotic-models.dockerfile b/docker/exotic-models.dockerfile index fb22e7b99db5dc..ff7e5898807296 100644 --- a/docker/exotic-models.dockerfile +++ b/docker/exotic-models.dockerfile @@ -1,17 +1,15 @@ FROM python:3.10-slim ENV PYTHONDONTWRITEBYTECODE=1 USER root -RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git libgl1-mesa-glx libgl1 g++ +RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git libgl1-mesa-glx libgl1 g++ tesseract-ocr 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 --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu -RUN apt-get install -y tesseract-ocr -RUN uv pip install --no-cache-dir -U pytesseract python-Levenshtein opencv-python nltk -RUN uv pip install --no-cache-dir natten==0.15.1+torch210cpu -f https://shi-labs.com/natten/wheels -# RUN uv pip install --no-cache-dir 'torchvision<0.17' 'torchaudio<2.2.0' -RUN uv pip install --no-cache-dir "transformers[testing, vision]" 'setuptools>=49.6.0' 'scikit-learn' 'torch-stft' 'nose' 'dataset' +RUN uv pip install --no-cache-dir --no-deps timm accelerate +RUN uv pip install --no-cache-dir pytesseract python-Levenshtein opencv-python nltk +# RUN uv pip install --no-cache-dir natten==0.15.1+torch210cpu -f https://shi-labs.com/natten/wheels +RUN pip install --no-cache-dir "transformers[testing, vision]" 'scikit-learn' 'torch-stft' 'nose' 'dataset' RUN git clone https://github.com/facebookresearch/detectron2.git RUN python3 -m pip install --no-cache-dir -e detectron2 RUN pip uninstall -y transformers