Yash Sachdeva commited on
Commit
cc94792
1 Parent(s): 3e0e8cb
Files changed (1) hide show
  1. Dockerfile +3 -34
Dockerfile CHANGED
@@ -10,41 +10,10 @@ RUN pip install transformers
10
 
11
  # Install pytorch starts
12
 
13
- FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04
14
- LABEL maintainer="Hugging Face"
15
 
16
- ARG DEBIAN_FRONTEND=noninteractive
17
-
18
- RUN apt update
19
- RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg
20
- RUN python3 -m pip install --no-cache-dir --upgrade pip
21
-
22
- ARG REF=main
23
- RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
24
-
25
- # If set to nothing, will install the latest version
26
- ARG PYTORCH='2.1.1'
27
- ARG TORCH_VISION=''
28
- ARG TORCH_AUDIO=''
29
- # Example: `cu102`, `cu113`, etc.
30
- ARG CUDA='cu121'
31
-
32
- RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' || VERSION='torch'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
33
- RUN [ ${#TORCH_VISION} -gt 0 ] && VERSION='torchvision=='TORCH_VISION'.*' || VERSION='torchvision'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
34
- RUN [ ${#TORCH_AUDIO} -gt 0 ] && VERSION='torchaudio=='TORCH_AUDIO'.*' || VERSION='torchaudio'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
35
-
36
- RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
37
-
38
- RUN python3 -m pip uninstall -y tensorflow flax
39
-
40
- RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract
41
- RUN python3 -m pip install -U "itsdangerous<2.1.0"
42
-
43
- # When installing in editable mode, `transformers` is not recognized as a package.
44
- # this line must be added in order for python to be aware of transformers.
45
- RUN cd transformers && python3 setup.py develop
46
-
47
- #Install pythorch ends
48
 
49
 
50
 
 
10
 
11
  # Install pytorch starts
12
 
13
+ RUN pip install https://download.pytorch.org/whl/cpu/torch-1.0.1-cp36-cp36m-win_amd64.whl
14
+ RUN pip install torchvision
15
 
16
+ #Install pytorch ends
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
 
19