Skip to content

Commit 131db00

Browse files
committed
add inf2 dlc
1 parent 260c5f4 commit 131db00

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

huggingface/pytorch/optimum/docker/0.0.22/Dockerfile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Fetch and extract the TGI sources
1+
# Fetch and extract the TGI sources (TGI_VERSION is mandatory)
22
FROM alpine AS tgi
33
RUN mkdir -p /tgi
4-
ADD https://github.com/huggingface/text-generation-inference/archive/refs/tags/v1.4.1.tar.gz /tgi/sources.tar.gz
4+
ADD https://github.com/huggingface/text-generation-inference/archive/refs/tags/v2.0.2.tar.gz /tgi/sources.tar.gz
55
RUN tar -C /tgi -xf /tgi/sources.tar.gz --strip-components=1
66

77
# Build cargo components (adapted from TGI original Dockerfile)
@@ -13,7 +13,6 @@ ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
1313

1414
FROM chef as planner
1515
COPY --from=tgi /tgi/Cargo.toml Cargo.toml
16-
COPY --from=tgi /tgi/Cargo.lock Cargo.lock
1716
COPY --from=tgi /tgi/rust-toolchain.toml rust-toolchain.toml
1817
COPY --from=tgi /tgi/proto proto
1918
COPY --from=tgi /tgi/benchmark benchmark
@@ -33,7 +32,6 @@ COPY --from=planner /usr/src/recipe.json recipe.json
3332
RUN cargo chef cook --release --recipe-path recipe.json
3433

3534
COPY --from=tgi /tgi/Cargo.toml Cargo.toml
36-
COPY --from=tgi /tgi/Cargo.lock Cargo.lock
3735
COPY --from=tgi /tgi/rust-toolchain.toml rust-toolchain.toml
3836
COPY --from=tgi /tgi/proto proto
3937
COPY --from=tgi /tgi/benchmark benchmark
@@ -43,13 +41,13 @@ RUN cargo build --release --workspace --exclude benchmark
4341

4442
# Fetch optimum-neuron sources
4543
FROM alpine/git AS optimum-neuron
46-
RUN git clone --depth 1 --branch v0.0.21 https://github.com/huggingface/optimum-neuron.git /optimum-neuron
44+
RUN git clone --depth 1 --branch v0.0.22 https://github.com/huggingface/optimum-neuron.git /optimum-neuron
4745

4846
# Python base image
4947
FROM ubuntu:22.04 AS base
5048

5149
RUN apt-get update -y \
52-
&& apt-get install -y --no-install-recommends \
50+
&& apt-get install -y --no-install-recommends \
5351
python3-pip \
5452
python3-setuptools \
5553
python-is-python3 \
@@ -61,7 +59,7 @@ RUN pip3 --no-cache-dir install --upgrade pip
6159
FROM base AS pyserver
6260

6361
RUN apt-get update -y \
64-
&& apt-get install -y --no-install-recommends \
62+
&& apt-get install -y --no-install-recommends \
6563
make \
6664
python3-venv \
6765
&& rm -rf /var/lib/apt/lists/* \
@@ -79,9 +77,10 @@ FROM base AS neuron
7977

8078
# Install system prerequisites
8179
RUN apt-get update -y \
82-
&& apt-get install -y --no-install-recommends \
80+
&& apt-get install -y --no-install-recommends \
8381
gnupg2 \
8482
wget \
83+
python3-dev \
8584
&& rm -rf /var/lib/apt/lists/* \
8685
&& apt-get clean
8786

@@ -90,7 +89,7 @@ RUN wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEU
9089

9190
# Install neuronx packages
9291
RUN apt-get update -y \
93-
&& apt-get install -y --no-install-recommends \
92+
&& apt-get install -y --no-install-recommends \
9493
aws-neuronx-dkms=2.16.7.0 \
9594
aws-neuronx-collectives=2.20.22.0-c101c322e \
9695
aws-neuronx-runtime-lib=2.20.22.0-1b3ca6425 \
@@ -102,13 +101,13 @@ ENV PATH="/opt/bin/:/opt/aws/neuron/bin:${PATH}"
102101

103102
RUN pip3 install \
104103
neuronx-cc==2.13.66.0 \
105-
torch-neuronx==1.13.1.1.14.0 \
104+
torch-neuronx==2.1.2.2.1.0 \
106105
transformers-neuronx==0.10.0.21 \
107106
--extra-index-url=https://pip.repos.neuron.amazonaws.com
108107

109108
# Install HuggingFace packages
110109
RUN pip3 install \
111-
hf_transfer
110+
hf_transfer huggingface_hub
112111

113112
# Install optimum-neuron
114113
COPY --from=optimum-neuron /optimum-neuron optimum-neuron
@@ -152,13 +151,13 @@ RUN HOME_DIR=/root && \
152151
rm -rf ${HOME_DIR}/oss_compliance*
153152

154153
RUN echo "N.B.: Although this image is released under the Apache-2.0 License, the Dockerfile used to build the image \
155-
has an indirect documentation dependency on third party <docutils/tools/editors/emacs/rst.el> project. The \
156-
<docutils/tools/editors/emacs/rst.el> project's licensing includes the <GPL v3> license. \
157-
\n\n\
158-
N.B.: Although this image is released under the Apache-2.0 License, the Dockerfile used to build the image uses the \
159-
third party <Text Generation Inference (TGI)> project. The <Text Generation Inference (TGI)> project's licensing \
160-
includes the <HFOIL --> https://github.com/huggingface/text-generation-inference/blob/main/LICENSE> \
161-
license." > /root/THIRD_PARTY_LICENSES
154+
has an indirect documentation dependency on third party <docutils/tools/editors/emacs/rst.el> project. The \
155+
<docutils/tools/editors/emacs/rst.el> project's licensing includes the <GPL v3> license. \
156+
\n\n\
157+
N.B.: Although this image is released under the Apache-2.0 License, the Dockerfile used to build the image uses the \
158+
third party <Text Generation Inference (TGI)> project. The <Text Generation Inference (TGI)> project's licensing \
159+
includes the <HFOIL --> https://github.com/huggingface/text-generation-inference/blob/main/LICENSE> \
160+
license." > /root/THIRD_PARTY_LICENSES
162161

163162
LABEL dlc_major_version="1"
164163
LABEL com.amazonaws.ml.engines.sagemaker.dlc.framework.huggingface.tgi="true"

releases.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,20 @@
3030
{
3131
"device": "inf2",
3232
"min_version": "0.0.16",
33-
"max_version": "0.0.21",
33+
"max_version": "0.0.22",
3434
"os_version": "ubuntu22.04",
3535
"python_version": "py310",
36-
"pytorch_version": "1.13.1"
36+
"pytorch_version": "2.1.2"
3737
}
3838
],
3939
"ignore_vulnerabilities": [],
4040
"releases": [
4141
{
42-
"device": "gpu",
43-
"version": "2.0.2",
42+
"device": "inf2",
43+
"version": "0.0.22",
4444
"os_version": "ubuntu22.04",
4545
"python_version": "py310",
46-
"cuda_version": "cu121",
47-
"pytorch_version": "2.3.0"
46+
"pytorch_version": "2.1.2"
4847
}
4948
]
50-
}
49+
}

0 commit comments

Comments
 (0)