-
Notifications
You must be signed in to change notification settings - Fork 470
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
[huggingface_pytorch] Training - DLC for Transformers to 4.46.1 - Accelerate 1.1.0 - PyTorch 2.3 #4393
Merged
Merged
[huggingface_pytorch] Training - DLC for Transformers to 4.46.1 - Accelerate 1.1.0 - PyTorch 2.3 #4393
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
94bdc3b
standby for trfrs 4.45 + accelerate 1.0.0 release.
JingyaHuang 8c1d64c
Merge branch 'master' into update-hf-pt2.3-train
JingyaHuang 6c69b5a
upgrade
JingyaHuang d0043ba
uchange dlc developer config
JingyaHuang 9c29f0c
fix local test
JingyaHuang 2d7cd38
test
JingyaHuang b53cdc0
skip build first
JingyaHuang 14fdfe4
Merge branch 'master' into update-hf-pt2.3-train
JingyaHuang 38c97e0
which test bugs?
JingyaHuang ddd147b
reduce test samples
JingyaHuang 190d69a
restore irrelevent test and build again
JingyaHuang b57cad7
patch & update some versions
JingyaHuang 41cad11
downgrade pip
JingyaHuang 6d08f54
Merge branch 'master' into update-hf-pt2.3-train
JingyaHuang 6bd36e6
Merge branch 'master' into update-hf-pt2.3-train
Captainia d0b01b5
Revert "uchange dlc developer config"
JingyaHuang 7f259a8
Merge branch 'master' into update-hf-pt2.3-train
JingyaHuang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
account_id: &ACCOUNT_ID <set-$ACCOUNT_ID-in-environment> | ||
region: ®ION <set-$REGION-in-environment> | ||
base_framework: &BASE_FRAMEWORK pytorch | ||
framework: &FRAMEWORK !join [ "huggingface_", *BASE_FRAMEWORK] | ||
version: &VERSION 2.1.0 | ||
short_version: &SHORT_VERSION "2.1" | ||
contributor: huggingface | ||
arch_type: x86 | ||
|
||
repository_info: | ||
training_repository: &TRAINING_REPOSITORY | ||
image_type: &TRAINING_IMAGE_TYPE training | ||
root: !join [ "huggingface/", *BASE_FRAMEWORK, "/", *TRAINING_IMAGE_TYPE ] | ||
repository_name: &REPOSITORY_NAME !join ["pr", "-", "huggingface", "-", *BASE_FRAMEWORK, "-", *TRAINING_IMAGE_TYPE] | ||
repository: &REPOSITORY !join [ *ACCOUNT_ID, .dkr.ecr., *REGION, .amazonaws.com/, *REPOSITORY_NAME ] | ||
|
||
images: | ||
BuildHuggingFacePytorchGpuPy310Cu121TrainingDockerImage: | ||
<<: *TRAINING_REPOSITORY | ||
build: &HUGGINGFACE_PYTORCH_GPU_TRAINING_PY3 false | ||
image_size_baseline: &IMAGE_SIZE_BASELINE 21500 | ||
device_type: &DEVICE_TYPE gpu | ||
python_version: &DOCKER_PYTHON_VERSION py3 | ||
tag_python_version: &TAG_PYTHON_VERSION py310 | ||
cuda_version: &CUDA_VERSION cu121 | ||
os_version: &OS_VERSION ubuntu20.04 | ||
transformers_version: &TRANSFORMERS_VERSION 4.36.0 | ||
datasets_version: &DATASETS_VERSION 2.18.0 | ||
tag: !join [ *VERSION, '-', 'transformers', *TRANSFORMERS_VERSION, '-', *DEVICE_TYPE, '-', *TAG_PYTHON_VERSION, '-', | ||
*CUDA_VERSION, '-', *OS_VERSION ] | ||
docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /, | ||
*CUDA_VERSION, /Dockerfile., *DEVICE_TYPE ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
huggingface/pytorch/training/docker/2.3/py3/cu121/Dockerfile.gpu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# https://github.com/aws/deep-learning-containers/blob/master/available_images.md | ||
# refer to the above page to pull latest Pytorch image | ||
|
||
# docker image region us-west-2 | ||
FROM 763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-training:2.3.0-gpu-py311-cu121-ubuntu20.04-sagemaker | ||
|
||
LABEL maintainer="Amazon AI" | ||
LABEL dlc_major_version="1" | ||
|
||
# version args | ||
ARG TRANSFORMERS_VERSION | ||
ARG DATASETS_VERSION | ||
ARG HUGGINGFACE_HUB_VERSION=0.25.1 | ||
ARG DIFFUSERS_VERSION=0.31.0 | ||
ARG EVALUATE_VERSION=0.4.3 | ||
ARG ACCELERATE_VERSION=1.1.0 | ||
ARG TRL_VERSION=0.11.4 | ||
ARG PEFT_VERSION=0.13.2 | ||
ARG FLASH_ATTN_VERSION=2.6.3 | ||
ARG PYTHON=python3 | ||
|
||
# TODO: Remove when the base image is updated | ||
RUN pip install --upgrade "pip==24.1.2" \ | ||
&& pip uninstall -y transformer-engine flash-attn pyarrow cryptography \ | ||
&& pip install --no-cache-dir -U pyarrow cryptography pyopenssl Pillow \ | ||
&& pip --no-cache-dir install --upgrade wheel setuptools \ | ||
&& pip install --no-cache-dir -U "werkzeug==3.0.6" | ||
|
||
# install Hugging Face libraries and its dependencies | ||
RUN pip install --no-cache-dir \ | ||
# hf_transfer will be a built-in feature, remove the extra then | ||
huggingface_hub[hf_transfer]==${HUGGINGFACE_HUB_VERSION} \ | ||
transformers[sklearn,sentencepiece,audio,vision,pipelines]==${TRANSFORMERS_VERSION} \ | ||
datasets==${DATASETS_VERSION} \ | ||
diffusers==${DIFFUSERS_VERSION} \ | ||
Jinja2 \ | ||
tensorboard \ | ||
bitsandbytes \ | ||
evaluate==${EVALUATE_VERSION} \ | ||
accelerate==${ACCELERATE_VERSION} \ | ||
trl==${TRL_VERSION} \ | ||
peft==${PEFT_VERSION} \ | ||
flash-attn==${FLASH_ATTN_VERSION} | ||
|
||
# hf_transfer will be a built-in feature, remove the env variavle then | ||
ENV HF_HUB_ENABLE_HF_TRANSFER="1" | ||
|
||
RUN apt-get update \ | ||
# TODO: Remove upgrade statements once packages are updated in base image | ||
&& apt-get -y upgrade --only-upgrade systemd openssl cryptsetup libkrb5-3 \ | ||
&& apt install -y git git-lfs \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN HOME_DIR=/root \ | ||
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \ | ||
&& unzip -o ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \ | ||
&& cp ${HOME_DIR}/oss_compliance/test/testOSSCompliance /usr/local/bin/testOSSCompliance \ | ||
&& chmod +x /usr/local/bin/testOSSCompliance \ | ||
&& chmod +x ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh \ | ||
&& ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} ${PYTHON} \ | ||
&& rm -rf ${HOME_DIR}/oss_compliance* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ubuntu 20 is reaching EOL, can we use a later version?
https://ubuntu.com/about/release-cycle
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.
Hi @e-davidson, we will use ubuntu 22.04 from PyTorch 2.4 DLCs.