-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/pytorch tpu container #14
Changes from 1 commit
d20a488
84ca2b2
42bbd21
e679d99
5447403
9b2fb84
de6c186
4680bcd
0901c59
c2e8a3b
815b0df
e935b17
6747611
68f94b4
79872fd
2a80fe2
b53b200
e75a3dd
e3041ad
7f2e378
6bb2197
b119483
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.1.0_3.10_tpuvm | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
FROM us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.1.0_3.10_tpuvm | ||
# The image with PyTorch = 2.1, Python=3.10 | ||
tengomucho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Read more about it here: https://github.com/pytorch/xla?tab=readme-ov-file#docker | ||
|
||
LABEL maintainer="Hugging Face" | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Versions | ||
ARG TRANSFORMERS='4.37.2' | ||
ARG DIFFUSERS='0.26.1' | ||
ARG PEFT='0.8.2' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if sentence transformers support tpu |
||
ARG TRL='0.7.10' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if sentence transformers support tpu There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right it doesn't. |
||
ARG DATASETS='2.16.1' | ||
ARG ACCELERATE='0.27.0' | ||
ARG EVALUATE='0.4.1' | ||
ARG SENTENCE_TRANSFORMERS='2.3.1' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if sentence transformers support tpu |
||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
bzip2 \ | ||
curl \ | ||
git \ | ||
git-lfs \ | ||
tar \ | ||
gcc \ | ||
g++ \ | ||
libaio-dev \ | ||
# audio | ||
libsndfile1-dev \ | ||
ffmpeg \ | ||
apt-transport-https \ | ||
gnupg \ | ||
ca-certificates \ | ||
&& apt-get clean autoremove --yes | ||
|
||
# Update pip | ||
RUN pip install --upgrade pip | ||
|
||
|
||
# Install Hugging Face Libraries | ||
RUN pip install --upgrade --no-cache-dir \ | ||
transformers[sklearn,sentencepiece,vision]==${TRANSFORMERS} \ | ||
diffusers==${DIFFUSERS} \ | ||
datasets==${DATASETS} \ | ||
accelerate==${ACCELERATE} \ | ||
evaluate==${EVALUATE} \ | ||
peft==${PEFT} \ | ||
trl==${TRL} \ | ||
sentence-transformers==${SENTENCE_TRANSFORMERS} | ||
|
||
#Install Google Cloud Dependencies | ||
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \ | ||
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ | ||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \ | ||
| apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \ | ||
apt-get update -y && \ | ||
apt-get install google-cloud-sdk -y | ||
|
||
RUN pip install --upgrade --no-cache-dir \ | ||
google-cloud-storage \ | ||
google-cloud-bigquery \ | ||
google-cloud-aiplatform \ | ||
google-cloud-pubsub \ | ||
google-cloud-logging | ||
|
||
# Check if correct versions are installed | ||
RUN python -c "import transformers, diffusers, datasets, accelerate, evaluate, peft, trl, sentence_transformers, torch; \ | ||
assert all([mod.__version__ == version for mod, version in [(transformers, '${TRANSFORMERS}'), (diffusers, '${DIFFUSERS}'), \ | ||
(datasets, '${DATASETS}'), (accelerate, '${ACCELERATE}'), (evaluate, '${EVALUATE}'), (peft, '${PEFT}'), (trl, '${TRL}'), \ | ||
(sentence_transformers, '${SENTENCE_TRANSFORMERS}'), (torch, '2.1.0')]])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, maybe delete this file