11ARG BASE_IMAGE=nvidia/cuda:12.1.0-devel-ubuntu22.04
22
33FROM $BASE_IMAGE
4+
5+ ARG NEURONX=0
6+
47SHELL ["/bin/bash" , "-c" ]
58
69LABEL maintainer="Hugging Face"
@@ -31,12 +34,12 @@ RUN apt-get update && \
3134 libsndfile1-dev \
3235 ffmpeg \
3336 && apt-get clean autoremove --yes \
34- && rm -rf /var/lib/{apt,dpkg,cache,log}
37+ && rm -rf /var/lib/{apt,cache,log}
38+
3539# Copying only necessary files as filtered by .dockerignore
3640COPY . .
3741
38- # install wheel and setuptools
39- RUN pip install --no-cache-dir -U pip ".[torch, st, diffusers]"
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
4043
4144# copy application
4245COPY src/huggingface_inference_toolkit huggingface_inference_toolkit
@@ -45,4 +48,6 @@ COPY src/huggingface_inference_toolkit/webservice_starlette.py webservice_starle
4548# copy entrypoint and change permissions
4649COPY --chmod=0755 scripts/entrypoint.sh entrypoint.sh
4750
48- ENTRYPOINT ["bash" , "-c" , "./entrypoint.sh" ]
51+ ENTRYPOINT ["bash" , "-c" , "./entrypoint.sh" ]
52+
53+ RUN apt-get update && apt-get install -y vim
0 commit comments