Skip to content

Commit ca365cc

Browse files
committed
wip split layers
Signed-off-by: Raphael Glon <[email protected]>
1 parent 8b63640 commit ca365cc

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

dockerfiles/pytorch/Dockerfile

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,39 @@ RUN apt-get update && \
3333
python3.11 \
3434
libsndfile1-dev \
3535
ffmpeg \
36+
gnupg2 \
37+
wget \
3638
&& apt-get clean autoremove --yes \
3739
&& rm -rf /var/lib/{apt,cache,log}
3840

3941
# Copying only necessary files as filtered by .dockerignore
4042
COPY . .
4143

42-
RUN if [[ "$NEURONX" == "1" ]];then /bin/bash -c "./dockerfiles/pytorch/neuronx.sh";else pip install --no-cache-dir -U pip ".[torch, st, diffusers]";fi
44+
RUN if [[ "$NEURONX" != "1" ]];then pip install --no-cache-dir -U pip ".[torch, st, diffusers]";fi
45+
46+
RUN if [[ "$NEURONX" == "1" ]];then . /etc/os-release && echo "deb https://apt.repos.neuron.amazonaws.com ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/neuron.list;fi
47+
48+
RUN if [[ "$NEURONX" == "1" ]];then wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | apt-key add -;fi
49+
50+
RUN if [[ "$NEURONX" == "1" ]];then apt-get update -y && \
51+
apt-get install -y --no-install-recommends \
52+
aws-neuronx-dkms=2.* \
53+
aws-neuronx-collectives=2.* \
54+
aws-neuronx-runtime-lib=2.* \
55+
aws-neuronx-tools=2.* && \
56+
apt-get clean autoremove --yes && \
57+
rm -rf /var/lib/{apt,cache,log};fi
58+
59+
RUN if [[ "$NEURONX" == "1" ]];then pip install -U pip && \
60+
# Taken from optimum neuron, tgi dockerfile
61+
pip3 install \
62+
neuronx-cc==2.13.66.0 \
63+
torch-neuronx==2.1.2.2.1.0 \
64+
transformers-neuronx==0.10.0.21 \
65+
--extra-index-url=https://pip.repos.neuron.amazonaws.com && \
66+
pip3 install --extra-index-url=https://pip.repos.neuron.amazonaws.com optimum[neuronx,diffusers] && \
67+
pip install ".[st,torch-neuronx]";fi
68+
4369

4470
# copy application
4571
COPY src/huggingface_inference_toolkit huggingface_inference_toolkit

0 commit comments

Comments
 (0)