AWS deep-learning-containers documentation change
Summary
Updated documentation with more details about container configurations, changed example to tutorial format, updated Dockerfile instructions with latest PyTorch training image, and reorganized command sequences
Security assessment
Changes focus on framework version updates, command syntax improvements, and documentation reorganization. No security advisories, vulnerability mitigations, or access control changes are mentioned. The --gpus all flag addition relates to hardware access configuration rather than security controls
Diff
diff --git a/deep-learning-containers/latest/devguide/deep-learning-containers-custom-images.md b/deep-learning-containers/latest/devguide/deep-learning-containers-custom-images.md index 1731faded..dc15e27e3 100644 --- a//deep-learning-containers/latest/devguide/deep-learning-containers-custom-images.md +++ b//deep-learning-containers/latest/devguide/deep-learning-containers-custom-images.md @@ -7 +7 @@ -We can customize both training and inference with Deep Learning Containers to add custom frameworks, libraries, and packages using Docker files. +Deep Learning Containers are built for specific machine learning frameworks, infrastructures, and Amazon cloud services. The full list of available images and their respective tags are available [here](https://github.com/aws/deep-learning-containers/blob/master/available_images.md). The containers come pre-configured with essential dependencies, eliminating the need for manual setup and optimization and they are readily available through Amazon Elastic Container Registry (ECR). Additionally, these containers are designed to work seamlessly with various Amazon cloud services, including Amazon SageMaker, Amazon EKS, Amazon EC2, and Amazon ECS. @@ -9 +9 @@ We can customize both training and inference with Deep Learning Containers to ad -### Example +### Tutorial @@ -11 +11 @@ We can customize both training and inference with Deep Learning Containers to ad -In the following example Dockerfile, we added the AWS samples GitHub repo which contains many deep learning model examples into the PyTorch Inference deep learning container. +In the following tutorial, we explore how to customize a PyTorch training container, providing you with a practical example of container customization. @@ -12,0 +13 @@ In the following example Dockerfile, we added the AWS samples GitHub repo which + * Choose latest PyTorch Training image: the tag for 2.7 PyTorch Training GPU image is - 2.7.1-gpu-py312-cu128-ubuntu22.04-ec2 @@ -14,2 +15 @@ In the following example Dockerfile, we added the AWS samples GitHub repo which - # Take base container - FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:2.4-cpu-py311-ec2 + * This image includes stable versions of key components, including NVIDIA CUDA, cuDNN and EFA. If you are looking for detailed information about libraries, frameworks and components included in PyTorch 2.7 Training image, refer to our release notes [here](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-pytorch-2-7-training-ec2-ecs-eks.html). @@ -17,2 +17,8 @@ In the following example Dockerfile, we added the AWS samples GitHub repo which - # Add custom stack of code - RUN git clone https://github.com/aws-samples/deep-learning-models + + + +Create a Dockerfile with this base image. + + + FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.7.1-gpu-py312-cu128-ubuntu22.04-ec2 + # Add custom code and testing scripts required @@ -23 +29 @@ Build the Docker image, pointing to your personal Docker registry (usually your - docker build -f Dockerfile -t <registry>/<any name>:<any tag> + $ docker build -t <registry>/<any name>:<any tag> @@ -25 +31 @@ Build the Docker image, pointing to your personal Docker registry (usually your -Push to your personal Docker Registry: +You can use the following command to run the container, and the "--gpus all" flag ensures GPU access when running the container. @@ -28 +34 @@ Push to your personal Docker Registry: - docker push <registry>/<any name>:<any tag> + $ docker run -it --gpus all <registry>/<image-name>:<tag> @@ -30 +36 @@ Push to your personal Docker Registry: -You can use the following command to run the container: +Push to your personal Docker Registry: @@ -33 +39 @@ You can use the following command to run the container: - docker run -it < name or tag> + $ docker push <registry>/<any name>:<any tag> @@ -40 +46,3 @@ You may need to login to access to the Deep Learning Containers image repository - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 763104351884.dkr.ecr.us-east-1.amazonaws.com + $ aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 763104351884.dkr.ecr.us-east-1.amazonaws.com + +Remember to replace registry names and tag with your actual registry name when building and pushing the image.