Skip to content

Commit c4ca4f5

Browse files
committed
Dockerfile inf2 -> use ubuntu 22.04
20.04 is reaching end of support this year anyway remove some unused dependencies for the inference web service to run Signed-off-by: Raphael Glon <[email protected]>
1 parent dc35a5b commit c4ca4f5

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

dockerfiles/pytorch/Dockerfile.inf2

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
# Build based on https://github.com/aws/deep-learning-containers/blob/master/huggingface/pytorch/inference/docker/2.1/py3/sdk2.18.0/Dockerfile.neuronx
2-
FROM ubuntu:20.04 as base
2+
FROM ubuntu:22.04 as base
33

44
LABEL maintainer="Hugging Face"
55

66
ARG PYTHON=python3.10
77
ARG PYTHON_VERSION=3.10.12
88
ARG MAMBA_VERSION=23.1.0-4
99

10-
# Neuron SDK components version numbers
11-
# ARG NEURONX_FRAMEWORK_VERSION=2.1.2.2.1.0
12-
# ARG NEURONX_DISTRIBUTED_VERSION=0.7.0
13-
# ARG NEURONX_CC_VERSION=2.13.66.0
14-
ARG NEURONX_TRANSFORMERS_VERSION=0.12.313
1510
ARG NEURONX_COLLECTIVES_LIB_VERSION=2.22.33.0-d2128d1aa
1611
ARG NEURONX_RUNTIME_LIB_VERSION=2.22.19.0-5856c0b42
1712
ARG NEURONX_TOOLS_VERSION=2.19.0.0
1813

19-
2014
# HF ARGS
2115
ARG OPTIMUM_NEURON_VERSION=0.0.28
2216

@@ -28,27 +22,18 @@ ENV PATH /opt/conda/bin:/opt/aws/neuron/bin:$PATH
2822
RUN apt-get update \
2923
&& apt-get upgrade -y \
3024
&& apt-get install -y --no-install-recommends software-properties-common \
31-
&& add-apt-repository ppa:openjdk-r/ppa \
3225
&& apt-get update \
3326
&& apt-get install -y --no-install-recommends \
3427
build-essential \
3528
apt-transport-https \
3629
ca-certificates \
3730
cmake \
3831
curl \
39-
emacs \
4032
git \
4133
jq \
42-
libgl1-mesa-glx \
43-
libsm6 \
44-
libxext6 \
45-
libxrender-dev \
46-
openjdk-11-jdk \
47-
vim \
4834
wget \
4935
unzip \
5036
zlib1g-dev \
51-
libcap-dev \
5237
gpg-agent \
5338
&& rm -rf /var/lib/apt/lists/* \
5439
&& rm -rf /tmp/tmp* \
@@ -67,11 +52,6 @@ RUN apt-get update \
6752
&& rm -rf /tmp/tmp* \
6853
&& apt-get clean
6954

70-
# https://github.com/docker-library/openjdk/issues/261 https://github.com/docker-library/openjdk/pull/263/files
71-
RUN keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts -destkeystore /etc/ssl/certs/java/cacerts.jks -deststoretype JKS -srcstorepass changeit -deststorepass changeit -noprompt; \
72-
mv /etc/ssl/certs/java/cacerts.jks /etc/ssl/certs/java/cacerts; \
73-
/var/lib/dpkg/info/ca-certificates-java.postinst configure;
74-
7555
RUN curl -L -o ~/mambaforge.sh https://github.com/conda-forge/miniforge/releases/download/${MAMBA_VERSION}/Mambaforge-${MAMBA_VERSION}-Linux-x86_64.sh \
7656
&& chmod +x ~/mambaforge.sh \
7757
&& ~/mambaforge.sh -b -p /opt/conda \
@@ -94,7 +74,6 @@ RUN curl -L -o ~/mambaforge.sh https://github.com/conda-forge/miniforge/releases
9474
&& /opt/conda/bin/conda clean -ya
9575

9676
RUN conda install -c conda-forge \
97-
scikit-learn \
9877
h5py \
9978
requests \
10079
&& conda clean -ya \

0 commit comments

Comments
 (0)