Skip to content
Closed
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
5 changes: 5 additions & 0 deletions jax/training/0.7/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
ENV PYTHONIOENCODING=UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/aws/neuron/lib"

Check warning on line 23 in jax/training/0.7/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (0.7, jax/training/0.7)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/amazon/efa/lib"
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/amazon/efa/lib64"
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/amazon/openmpi/lib64"
Expand Down Expand Up @@ -106,6 +106,7 @@
pip \
requests \
setuptools \
uv \
&& rm -rf ~/.cache/pip/*

# U24 will not allow installation of pip packages outside of venv without this flag
Expand Down Expand Up @@ -156,9 +157,9 @@

# Setting up APT and PIP repo for neuron artifacts
ARG NEURON_APT_REPO=apt.repos.neuron.amazonaws.com
ARG NEURON_APT_REPO_KEY

Check warning on line 160 in jax/training/0.7/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (0.7, jax/training/0.7)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NEURON_APT_REPO_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG NEURON_PIP_REPO=pip.repos.neuron.amazonaws.com
ARG NEURON_PIP_REPO_KEY

Check warning on line 162 in jax/training/0.7/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (0.7, jax/training/0.7)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NEURON_PIP_REPO_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
RUN mkdir -p /etc/apt/keyrings \
&& APT_REPO_PREFIX=$([ -n "${NEURON_APT_REPO_KEY}" ] && echo "${NEURON_APT_REPO_KEY}@" || echo "") \
&& echo "deb [signed-by=/etc/apt/keyrings/neuron.gpg] https://${APT_REPO_PREFIX}${NEURON_APT_REPO} jammy main" > /etc/apt/sources.list.d/neuron.list \
Expand All @@ -168,8 +169,10 @@
ARG NEURONX_RUNTIME_LIB_VERSION=2.29.40.0-f954cd7a5
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.29.41.0-681fef5f5
ARG NEURONX_TOOLS_VERSION=2.27.33.0-5d9c0b901

ARG NEURONX_CC_VERSION=2.22.12471.0+b4a00d10
ARG NEURONX_JAX_TRAINING_VERSION=0.7.0.1.0.7377+5e6a4049
ARG NKI_VERSION=0.1.0+g432b459e

FROM base AS repo

Expand All @@ -190,6 +193,7 @@
--trusted-host ${NEURON_PIP_REPO} \
"neuronx-cc>=2.0" \
jax-neuronx \
"nki==0.1.0+g7eca0d23" \
&& rm -rf ~/.cache/pip/*

FROM base AS prod
Expand All @@ -213,6 +217,7 @@
--extra-index-url ${PYPI_SIMPLE_URL} \
neuronx-cc==$NEURONX_CC_VERSION \
jax-neuronx==$NEURONX_JAX_TRAINING_VERSION \
nki==$NKI_VERSION \
&& rm -rf ~/.cache/pip/*

FROM ${BUILD_STAGE} AS final
Expand Down
4 changes: 4 additions & 0 deletions pytorch/inference/2.9.0/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# See http://bugs.python.org/issue19846
ENV LANG=C.UTF-8
ENV LD_LIBRARY_PATH=/opt/aws/neuron/lib:/lib/x86_64-linux-gnu:/opt/conda/lib/:$LD_LIBRARY_PATH

Check warning on line 19 in pytorch/inference/2.9.0/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (2.9.0, pytorch/inference/2.9.0)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ENV PATH=/opt/conda/bin:/opt/aws/neuron/bin:$PATH

RUN apt-get update \
Expand Down Expand Up @@ -125,6 +125,7 @@
"awscli<2" \
pandas \
boto3 \
uv \
cryptography \
"protobuf>=3.18.3,<4" \
torchserve==${TORCHSERVE_VERSION} \
Expand Down Expand Up @@ -166,9 +167,9 @@

# Setting up APT and PIP repo for neuron artifacts
ARG NEURON_APT_REPO=apt.repos.neuron.amazonaws.com
ARG NEURON_APT_REPO_KEY

Check warning on line 170 in pytorch/inference/2.9.0/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (2.9.0, pytorch/inference/2.9.0)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NEURON_APT_REPO_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG NEURON_PIP_REPO=pip.repos.neuron.amazonaws.com
ARG NEURON_PIP_REPO_KEY

Check warning on line 172 in pytorch/inference/2.9.0/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (2.9.0, pytorch/inference/2.9.0)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NEURON_PIP_REPO_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
RUN mkdir -p /etc/apt/keyrings \
&& APT_REPO_PREFIX=$([ -n "${NEURON_APT_REPO_KEY}" ] && echo "${NEURON_APT_REPO_KEY}@" || echo "") \
&& echo "deb [signed-by=/etc/apt/keyrings/neuron.gpg] https://${APT_REPO_PREFIX}${NEURON_APT_REPO} jammy main" > /etc/apt/sources.list.d/neuron.list \
Expand All @@ -183,6 +184,7 @@
ARG NEURONX_FRAMEWORK_VERSION=2.9.0.2.11.19912+e48cd891
ARG NEURONX_DISTRIBUTED_VERSION=0.16.25997+f431c02e
ARG NEURONX_DISTRIBUTED_INFERENCE_VERSION=0.7.15063+bafa28d5
ARG NKI_VERSION=0.1.0+g432b459e

FROM base AS repo

Expand All @@ -205,6 +207,7 @@
"torch-neuronx==2.9.*" \
neuronx_distributed \
neuronx_distributed_inference \
"nki==0.1.0+g7eca0d23" \
&& rm -rf ~/.cache/pip/*

FROM base AS prod
Expand All @@ -228,6 +231,7 @@
torch-neuronx==$NEURONX_FRAMEWORK_VERSION \
neuronx_distributed==$NEURONX_DISTRIBUTED_VERSION \
neuronx_distributed_inference==$NEURONX_DISTRIBUTED_INFERENCE_VERSION \
nki==$NKI_VERSION \
&& rm -rf ~/.cache/pip/*

FROM ${BUILD_STAGE} AS final
Expand Down
5 changes: 5 additions & 0 deletions pytorch/training/2.9.0/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
ENV PYTHONIOENCODING=UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/aws/neuron/lib"

Check warning on line 24 in pytorch/training/2.9.0/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (2.9.0, pytorch/training/2.9.0)

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/amazon/efa/lib"
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/amazon/efa/lib64"
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/amazon/openmpi/lib64"
Expand Down Expand Up @@ -128,6 +128,7 @@
psutil==5.6.7 \
dataset \
Pillow \
uv \
&& rm -rf ~/.cache/pip/*

RUN mkdir -p /etc/pki/tls/certs && cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
Expand Down Expand Up @@ -202,9 +203,9 @@

# Setting up APT and PIP repo for neuron artifacts
ARG NEURON_APT_REPO=apt.repos.neuron.amazonaws.com
ARG NEURON_APT_REPO_KEY

Check warning on line 206 in pytorch/training/2.9.0/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (2.9.0, pytorch/training/2.9.0)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NEURON_APT_REPO_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
ARG NEURON_PIP_REPO=pip.repos.neuron.amazonaws.com
ARG NEURON_PIP_REPO_KEY

Check warning on line 208 in pytorch/training/2.9.0/Dockerfile.neuronx

View workflow job for this annotation

GitHub Actions / build (2.9.0, pytorch/training/2.9.0)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "NEURON_PIP_REPO_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
RUN mkdir -p /etc/apt/keyrings \
&& APT_REPO_PREFIX=$([ -n "${NEURON_APT_REPO_KEY}" ] && echo "${NEURON_APT_REPO_KEY}@" || echo "") \
&& echo "deb [signed-by=/etc/apt/keyrings/neuron.gpg] https://${APT_REPO_PREFIX}${NEURON_APT_REPO} jammy main" > /etc/apt/sources.list.d/neuron.list \
Expand All @@ -214,10 +215,12 @@
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.29.41.0-681fef5f5
ARG NEURONX_RUNTIME_LIB_VERSION=2.29.40.0-f954cd7a5
ARG NEURONX_TOOLS_VERSION=2.27.33.0-5d9c0b901

ARG NEURONX_FRAMEWORK_VERSION=2.9.0.2.11.19912+e48cd891
ARG NEURONX_CC_VERSION=2.22.12471.0+b4a00d10
ARG NEURONX_DISTRIBUTED_VERSION=0.16.25997+f431c02e
ARG NEURONX_DISTRIBUTED_TRAINING_VERSION=1.7.0
ARG NKI_VERSION=0.1.0+g432b459e

FROM base AS repo

Expand All @@ -240,6 +243,7 @@
"neuronx-cc>=2.0" \
neuronx_distributed \
neuronx_distributed_training \
"nki==0.1.0+g7eca0d23" \
&& rm -rf ~/.cache/pip/*

FROM base AS prod
Expand All @@ -263,6 +267,7 @@
neuronx-cc==$NEURONX_CC_VERSION \
neuronx_distributed==$NEURONX_DISTRIBUTED_VERSION \
neuronx_distributed_training==$NEURONX_DISTRIBUTED_TRAINING_VERSION \
nki==$NKI_VERSION \
&& rm -rf ~/.cache/pip/*

FROM ${BUILD_STAGE} AS final
Expand Down
31 changes: 12 additions & 19 deletions vllm/inference/0.13.0/Dockerfile.neuronx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ RUN ${PIP} install --no-cache-dir -U \
"cmake>=3.26" \
"setuptools-scm>=8" \
"jinja2" \
uv \
torchserve==${TORCHSERVE_VERSION} \
torch-model-archiver==${TORCHSERVE_VERSION} \
&& rm -rf ~/.cache/pip/*
Expand Down Expand Up @@ -165,20 +166,18 @@ ARG NEURONX_DISTRIBUTED_VERSION=0.16.25997+f431c02e
ARG NEURONX_DISTRIBUTED_INFERENCE_VERSION=0.7.15063+bafa28d5
ARG NKI_VERSION=0.1.0+g432b459e

# vLLM branch names
ARG VLLM_PRIVATE_BRANCH=release-0.3.0
ARG VLLM_PUBLIC_BRANCH=release-0.3.0
# GitHub repository and branch
ARG GITHUB_REPO=https://github.com/vllm-project/vllm-neuron.git
ARG GITHUB_REPO_BRANCH=release-0.2.3+lts

FROM base AS vllm-clone
# Configure SSH access
RUN mkdir -p /root/.ssh \
&& echo "StrictHostKeyChecking no" >> /root/.ssh/config \
&& ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts

RUN mkdir -p /root/.ssh && \
echo "StrictHostKeyChecking no" >> /root/.ssh/config && \
ssh-keyscan -t rsa github.com >> /root/.ssh/known_hosts

WORKDIR /vllm

RUN --mount=type=secret,id=ssh_key,target=/root/.ssh/id_ed25519,mode=0600 \
git clone -b ${VLLM_PRIVATE_BRANCH} git@github.com:aws-neuron/private-vllm-neuron.git .
# Clone vllm-neuronx repository
RUN --mount=type=secret,id=containers_github_ssh_key,target=/root/.ssh/id_ed25519,mode=0600 \
git clone -b ${GITHUB_REPO_BRANCH} ${GITHUB_REPO} /opt/vllm

FROM base AS repo

Expand All @@ -193,9 +192,6 @@ RUN apt-get update \
&& rm -rf /tmp/tmp* \
&& apt-get clean

# Install VLLM from source
COPY --from=vllm-clone /vllm /opt/vllm

RUN PIP_REPO_URL=$([ -n "${NEURON_PIP_REPO_KEY}" ] && echo "https://${NEURON_PIP_REPO_KEY}@${NEURON_PIP_REPO}" || echo "https://${NEURON_PIP_REPO}") \
&& ${PIP} install --no-cache-dir \
--index-url ${PIP_REPO_URL} \
Expand All @@ -205,7 +201,7 @@ RUN PIP_REPO_URL=$([ -n "${NEURON_PIP_REPO_KEY}" ] && echo "https://${NEURON_PIP
"torch-neuronx==2.9.*" \
neuronx_distributed \
neuronx_distributed_inference \
nki \
"nki==0.1.0+g7eca0d23" \
-e /opt/vllm \
&& rm -rf ~/.cache/pip/*

Expand All @@ -221,9 +217,6 @@ RUN apt-get update \
&& rm -rf /tmp/tmp* \
&& apt-get clean

# Clone VLLM source before pip installations
RUN git clone -b "${VLLM_PUBLIC_BRANCH}" https://github.com/vllm-project/vllm-neuron.git /opt/vllm

RUN PIP_REPO_URL=$([ -n "${NEURON_PIP_REPO_KEY}" ] && echo "https://${NEURON_PIP_REPO_KEY}@${NEURON_PIP_REPO}" || echo "https://${NEURON_PIP_REPO}") \
&& ${PIP} install --no-cache-dir \
--index-url ${PIP_REPO_URL} \
Expand Down
Loading