Explicit versions in docker files (#17586)
* Update docker file Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,15 @@ LABEL maintainer="Hugging Face"
|
|||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# The following `ARG` are mainly used to specify the versions explicitly & directly in this docker file, and not meant
|
||||||
|
# to be used as arguments for docker build (so far).
|
||||||
|
|
||||||
|
ARG PYTORCH='1.11.0'
|
||||||
|
# (not always a valid torch version)
|
||||||
|
ARG INTEL_TORCH_EXT='1.11.0'
|
||||||
|
# Example: `cu102`, `cu113`, etc.
|
||||||
|
ARG CUDA='cu113'
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update
|
||||||
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg git-lfs
|
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg git-lfs
|
||||||
RUN git lfs install
|
RUN git lfs install
|
||||||
@@ -12,12 +21,12 @@ ARG REF=main
|
|||||||
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
|
RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
|
||||||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev,onnxruntime]
|
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev,onnxruntime]
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir -U torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
|
RUN python3 -m pip install --no-cache-dir -U torch==$PYTORCH torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/$CUDA
|
||||||
RUN python3 -m pip install --no-cache-dir -U tensorflow
|
RUN python3 -m pip install --no-cache-dir -U tensorflow
|
||||||
RUN python3 -m pip uninstall -y flax jax
|
RUN python3 -m pip uninstall -y flax jax
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+cu113.html
|
RUN python3 -m pip install --no-cache-dir torch-scatter -f https://data.pyg.org/whl/torch-$PYTORCH+$CUDA.html
|
||||||
RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$(python3 -c "from torch import version; print(version.__version__.split('+')[0])")+cpu -f https://software.intel.com/ipex-whl-stable
|
RUN python3 -m pip install --no-cache-dir intel_extension_for_pytorch==$INTEL_TORCH_EXT+cpu -f https://software.intel.com/ipex-whl-stable
|
||||||
|
|
||||||
RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
|
RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract https://github.com/kpu/kenlm/archive/master.zip
|
||||||
RUN python3 -m pip install -U "itsdangerous<2.1.0"
|
RUN python3 -m pip install -U "itsdangerous<2.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user