Pin PyTorch extras for AMD containers (#38941)
* Pin additional Torch packages * Remove unused def --------- Co-authored-by: ivarflakstad <69173633+ivarflakstad@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,9 @@ LABEL maintainer="Hugging Face"
|
|||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
ARG TORCH_VISION='0.21.0'
|
||||||
|
ARG TORCH_AUDIO='2.6.0'
|
||||||
|
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt install -y --no-install-recommends git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-dev python3-pip python3-dev ffmpeg git-lfs && \
|
apt install -y --no-install-recommends git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-dev python3-pip python3-dev ffmpeg git-lfs && \
|
||||||
apt clean && \
|
apt clean && \
|
||||||
@@ -20,6 +23,7 @@ WORKDIR /
|
|||||||
ADD https://api.github.com/repos/huggingface/transformers/git/refs/heads/main version.json
|
ADD https://api.github.com/repos/huggingface/transformers/git/refs/heads/main version.json
|
||||||
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 torchvision==$TORCH_VISION torchaudio==$TORCH_AUDIO
|
||||||
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
|
RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
|
||||||
|
|
||||||
RUN python3 -m pip uninstall -y tensorflow flax
|
RUN python3 -m pip uninstall -y tensorflow flax
|
||||||
|
|||||||
Reference in New Issue
Block a user