Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
9d206012
Unverified
Commit
9d206012
authored
Oct 05, 2023
by
Yih-Dar
Committed by
GitHub
Oct 05, 2023
Browse files
Fix `transformers-pytorch-gpu` docker build (#26615)
Fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
9e78c9ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
docker/transformers-pytorch-gpu/Dockerfile
docker/transformers-pytorch-gpu/Dockerfile
+3
-2
No files found.
docker/transformers-pytorch-gpu/Dockerfile
View file @
9d206012
...
...
@@ -9,10 +9,9 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip
ARG
REF=main
RUN
git clone https://github.com/huggingface/transformers
&&
cd
transformers
&&
git checkout
$REF
RUN
python3
-m
pip
install
--no-cache-dir
-e
./transformers[dev-torch,testing,video]
# If set to nothing, will install the latest version
ARG
PYTORCH='2.
0.1
'
ARG
PYTORCH='2.
1.0
'
ARG
TORCH_VISION=''
ARG
TORCH_AUDIO=''
# Example: `cu102`, `cu113`, etc.
...
...
@@ -22,6 +21,8 @@ RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' || VERSION='torch';
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
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
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
install
--no-cache-dir
git+https://github.com/facebookresearch/detectron2.git pytesseract
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment