Skip to content
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

Add Dockerfiles for Neuron DLC with SDK 2.19.0 #17

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker/pytorch/inference/1.13.1/Dockerfile.neuron
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM public.ecr.aws/docker/library/ubuntu:20.04

LABEL dlc_major_version="1"

Check failure on line 3 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3048 style: Invalid label key.
LABEL maintainer="Amazon AI"
LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true

# Neuron SDK components version numbers
ARG NEURON_FRAMEWORK_VERSION=1.13.1.2.9.74.0
ARG NEURON_CC_VERSION=1.22.0.0
ARG NEURONX_TOOLS_VERSION=2.17.1.0
ARG NEURON_FRAMEWORK_VERSION=1.13.1.2.10.12.0
ARG NEURON_CC_VERSION=1.23.5.0
ARG NEURONX_TOOLS_VERSION=2.18.3.0

ARG PYTHON=python3.10
ARG PYTHON_VERSION=3.10.12
ARG TORCHSERVE_VERSION=0.10.0
ARG TORCHSERVE_VERSION=0.11.0
ARG SM_TOOLKIT_VERSION=2.0.21
ARG MAMBA_VERSION=23.1.0-4

Expand All @@ -22,7 +22,7 @@
ENV SAGEMAKER_SERVING_MODULE=sagemaker_pytorch_serving_container.serving:main
ENV TEMP=/home/model-server/tmp

RUN apt-get update \

Check failure on line 25 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:openjdk-r/ppa \
Expand Down Expand Up @@ -53,9 +53,9 @@
&& apt-get clean

RUN echo "deb https://apt.repos.neuron.amazonaws.com focal main" > /etc/apt/sources.list.d/neuron.list
RUN wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | apt-key add -

Check failure on line 56 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

RUN apt-get update \

Check failure on line 58 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
&& apt-get install -y aws-neuronx-tools=$NEURONX_TOOLS_VERSION \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/tmp* \
Expand All @@ -66,7 +66,7 @@
mv /etc/ssl/certs/java/cacerts.jks /etc/ssl/certs/java/cacerts; \
/var/lib/dpkg/info/ca-certificates-java.postinst configure;

RUN curl -L -o ~/mambaforge.sh https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-x86_64.sh \

Check failure on line 69 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL4001 warning: Either use Wget or Curl but not both
&& chmod +x ~/mambaforge.sh \
&& ~/mambaforge.sh -b -p /opt/conda \
&& rm ~/mambaforge.sh \
Expand All @@ -85,7 +85,7 @@

&& /opt/conda/bin/conda clean -ya

RUN conda install -c conda-forge \

Check failure on line 88 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 88 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
scikit-learn \
h5py \
requests \
Expand All @@ -96,7 +96,7 @@
enum-compat \
ipython

RUN pip install --no-cache-dir -U \

Check failure on line 99 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
opencv-python>=4.8.1.78 \
"numpy<1.24,>1.21" \
"scipy>=1.8.0" \
Expand All @@ -107,7 +107,7 @@
boto3 \
cryptography

RUN pip install neuron-cc==$NEURON_CC_VERSION --extra-index-url https://pip.repos.neuron.amazonaws.com \

Check failure on line 110 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
torch-neuron==$NEURON_FRAMEWORK_VERSION \
&& pip install -U protobuf==3.19.5 \
torchserve==${TORCHSERVE_VERSION} \
Expand All @@ -131,7 +131,7 @@

RUN chmod +x /usr/local/bin/deep_learning_container.py

RUN pip install --no-cache-dir "sagemaker-pytorch-inference==${SM_TOOLKIT_VERSION}"

Check failure on line 134 in docker/pytorch/inference/1.13.1/Dockerfile.neuron

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

RUN HOME_DIR=/root \
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \
Expand Down
16 changes: 8 additions & 8 deletions docker/pytorch/inference/1.13.1/Dockerfile.neuronx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
FROM public.ecr.aws/docker/library/ubuntu:20.04

LABEL dlc_major_version="1"

Check failure on line 3 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3048 style: Invalid label key.
LABEL maintainer="Amazon AI"
LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true

# Neuron SDK components version numbers
ARG NEURONX_FRAMEWORK_VERSION=1.13.1.1.14.0
ARG NEURONX_DISTRIBUTED_VERSION=0.7.0
ARG NEURONX_CC_VERSION=2.13.72.0
ARG NEURONX_TRANSFORMERS_VERSION=0.10.0.360
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.20.22.0-c101c322e
ARG NEURONX_RUNTIME_LIB_VERSION=2.20.22.0-1b3ca6425
ARG NEURONX_TOOLS_VERSION=2.17.1.0
ARG NEURONX_FRAMEWORK_VERSION=1.13.1.1.15.0
ARG NEURONX_DISTRIBUTED_VERSION=0.8.0
ARG NEURONX_CC_VERSION=2.14.213.0
ARG NEURONX_TRANSFORMERS_VERSION=0.11.351
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.21.46.0-69b77134b
ARG NEURONX_RUNTIME_LIB_VERSION=2.21.41.0-fb1705f5f
ARG NEURONX_TOOLS_VERSION=2.18.3.0

ARG PYTHON=python3.10
ARG PYTHON_VERSION=3.10.12
ARG TORCHSERVE_VERSION=0.10.0
ARG TORCHSERVE_VERSION=0.11.0
ARG SM_TOOLKIT_VERSION=2.0.21
ARG MAMBA_VERSION=23.1.0-4

Expand All @@ -26,7 +26,7 @@
ENV SAGEMAKER_SERVING_MODULE=sagemaker_pytorch_serving_container.serving:main
ENV TEMP=/home/model-server/tmp

RUN apt-get update \

Check failure on line 29 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:openjdk-r/ppa \
Expand Down Expand Up @@ -57,9 +57,9 @@
&& apt-get clean

RUN echo "deb https://apt.repos.neuron.amazonaws.com focal main" > /etc/apt/sources.list.d/neuron.list
RUN wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | apt-key add -

Check failure on line 60 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

RUN apt-get update \

Check failure on line 62 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
&& apt-get install -y \
aws-neuronx-tools=$NEURONX_TOOLS_VERSION \
aws-neuronx-collectives=$NEURONX_COLLECTIVES_LIB_VERSION \
Expand All @@ -73,7 +73,7 @@
mv /etc/ssl/certs/java/cacerts.jks /etc/ssl/certs/java/cacerts; \
/var/lib/dpkg/info/ca-certificates-java.postinst configure;

RUN curl -L -o ~/mambaforge.sh https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-x86_64.sh \

Check failure on line 76 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL4001 warning: Either use Wget or Curl but not both
&& chmod +x ~/mambaforge.sh \
&& ~/mambaforge.sh -b -p /opt/conda \
&& rm ~/mambaforge.sh \
Expand All @@ -92,7 +92,7 @@

&& /opt/conda/bin/conda clean -ya

RUN conda install -c conda-forge \

Check failure on line 95 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 95 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
scikit-learn \
h5py \
requests \
Expand All @@ -103,7 +103,7 @@
enum-compat \
ipython

RUN pip install --no-cache-dir -U \

Check failure on line 106 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
opencv-python>=4.8.1.78 \
"numpy<1.24,>1.21" \
"scipy>=1.8.0" \
Expand All @@ -114,7 +114,7 @@
boto3 \
cryptography

RUN pip install -U --extra-index-url https://pip.repos.neuron.amazonaws.com \

Check failure on line 117 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
neuronx-cc==$NEURONX_CC_VERSION \
torch-neuronx==$NEURONX_FRAMEWORK_VERSION \
transformers-neuronx==$NEURONX_TRANSFORMERS_VERSION \
Expand All @@ -141,7 +141,7 @@

RUN chmod +x /usr/local/bin/deep_learning_container.py

RUN pip install --no-cache-dir "sagemaker-pytorch-inference==${SM_TOOLKIT_VERSION}"

Check failure on line 144 in docker/pytorch/inference/1.13.1/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / dockerfile-linter

DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.

# patch default_pytorch_inference_handler.py to import torch_neuronx
RUN DEST_DIR=$(python -c "import os.path, sagemaker_pytorch_serving_container; print(os.path.dirname(sagemaker_pytorch_serving_container.__file__))") \
Expand Down
16 changes: 8 additions & 8 deletions docker/pytorch/inference/2.1.2/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ LABEL maintainer="Amazon AI"
LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true

# Neuron SDK components version numbers
ARG NEURONX_DISTRIBUTED_VERSION=0.7.0
ARG NEURONX_CC_VERSION=2.13.72.0
ARG NEURONX_FRAMEWORK_VERSION=2.1.2.2.1.0
ARG NEURONX_TRANSFORMERS_VERSION=0.10.0.360
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.20.22.0-c101c322e
ARG NEURONX_RUNTIME_LIB_VERSION=2.20.22.0-1b3ca6425
ARG NEURONX_TOOLS_VERSION=2.17.1.0
ARG NEURONX_DISTRIBUTED_VERSION=0.8.0
ARG NEURONX_CC_VERSION=2.14.213.0
ARG NEURONX_FRAMEWORK_VERSION=2.1.2.2.2.0
ARG NEURONX_TRANSFORMERS_VERSION=0.11.351
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.21.46.0-69b77134b
ARG NEURONX_RUNTIME_LIB_VERSION=2.21.41.0-fb1705f5f
ARG NEURONX_TOOLS_VERSION=2.18.3.0

ARG PYTHON=python3.10
ARG PYTHON_VERSION=3.10.12
ARG TORCHSERVE_VERSION=0.10.0
ARG TORCHSERVE_VERSION=0.11.0
ARG SM_TOOLKIT_VERSION=2.0.21
ARG MAMBA_VERSION=23.1.0-4

Expand Down
12 changes: 6 additions & 6 deletions docker/pytorch/training/1.13.1/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ LABEL maintainer="Amazon AI"
LABEL dlc_major_version="1"

# Neuron SDK components version numbers
ARG NEURONX_FRAMEWORK_VERSION=1.13.1.1.14.0
ARG NEURONX_DISTRIBUTED_VERSION=0.7.0
ARG NEURONX_CC_VERSION=2.13.72.0
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.20.22.0-c101c322e
ARG NEURONX_RUNTIME_LIB_VERSION=2.20.22.0-1b3ca6425
ARG NEURONX_TOOLS_VERSION=2.17.1.0
ARG NEURONX_FRAMEWORK_VERSION=1.13.1.1.15.0
ARG NEURONX_DISTRIBUTED_VERSION=0.8.0
ARG NEURONX_CC_VERSION=2.14.213.0
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.21.46.0-69b77134b
ARG NEURONX_RUNTIME_LIB_VERSION=2.21.41.0-fb1705f5f
ARG NEURONX_TOOLS_VERSION=2.18.3.0

ARG PYTHON=python3.10
ARG PYTHON_VERSION=3.10.12
Expand Down
12 changes: 6 additions & 6 deletions docker/pytorch/training/2.1.2/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ LABEL maintainer="Amazon AI"
LABEL dlc_major_version="1"

# Neuron SDK components version numbers
ARG NEURONX_DISTRIBUTED_VERSION=0.7.0
ARG NEURONX_CC_VERSION=2.13.72.0
ARG NEURONX_FRAMEWORK_VERSION=2.1.2.2.1.0
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.20.22.0-c101c322e
ARG NEURONX_RUNTIME_LIB_VERSION=2.20.22.0-1b3ca6425
ARG NEURONX_TOOLS_VERSION=2.17.1.0
ARG NEURONX_DISTRIBUTED_VERSION=0.8.0
ARG NEURONX_CC_VERSION=2.14.213.0
ARG NEURONX_FRAMEWORK_VERSION=2.1.2.2.2.0
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.21.46.0-69b77134b
ARG NEURONX_RUNTIME_LIB_VERSION=2.21.41.0-fb1705f5f
ARG NEURONX_TOOLS_VERSION=2.18.3.0

ARG PYTHON=python3.10
ARG PYTHON_VERSION=3.10.12
Expand Down