Skip to content

Commit b26d29f

Browse files
authored
chore: patch cves related to emacs, certifi, and and golang (#4631)
1 parent 229c4b4 commit b26d29f

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

huggingface/pytorch/training/docker/2.1/py3/sdk2.20.0/Dockerfile.neuronx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ ARG DATASETS_VERSION
1414
ARG GEVENT_VERSION=24.10.3
1515
ARG PYTHON=python3
1616

17-
RUN apt-get remove -y --purge emacs && \
18-
apt-get autoremove -y
1917

2018
RUN pip install --upgrade pip
2119

@@ -29,6 +27,10 @@ RUN pip install --no-cache-dir \
2927
peft \
3028
gevent==${GEVENT_VERSION}
3129

30+
31+
RUN pip uninstall -y certifi
32+
RUN rm -rf /usr/lib/python3/dist-packages/certifi*
33+
3234
# Pin numpy to version required by neuronx-cc
3335
# Update Pillow and urllib version to fix high and critical vulnerabilities
3436
RUN pip install -U \
@@ -44,7 +46,10 @@ RUN pip install -U \
4446
boto3 \
4547
botocore \
4648
google-auth \
47-
"urllib3>=1.26.17,<1.27"
49+
"urllib3>=1.26.17,<1.27" \
50+
certifi
51+
52+
RUN rm -rf /usr/lib/go-*
4853

4954
RUN apt-get update \
5055
&& apt install -y --no-install-recommends \
@@ -55,10 +60,18 @@ RUN apt-get update \
5560
libarchive13 \
5661
libgstreamer1.0-0 \
5762
libgstreamer-plugins-base1.0-0 \
58-
&& apt-get upgrade -y apparmor \
63+
&& apt-get upgrade -y apparmor golang-go \
5964
&& apt-get clean \
6065
&& rm -rf /var/lib/apt/lists/*
6166

67+
RUN apt-get update && \
68+
apt-get install -y golang-1.21 && \
69+
update-alternatives --install /usr/bin/go go /usr/lib/go-1.21/bin/go 1 && \
70+
update-alternatives --install /usr/bin/gofmt gofmt /usr/lib/go-1.21/bin/gofmt 1
71+
72+
RUN apt-get remove -y --purge emacs emacs-common && \
73+
apt-get autoremove -y
74+
6275
RUN HOME_DIR=/root \
6376
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \
6477
&& unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \

0 commit comments

Comments
 (0)