Skip to content

Commit b0365c8

Browse files
authored
Update Docker images to fix resolve vulnerability scan issues (#2007)
* Update upgradable packages to resolve Docker scan issues * Upgrade to nodejs 18.x * Update Pillow to 9.3.0, Pillow-SIMD to 9.0.0.post1 * Upgrade ipython to 8.11.0 * Upgrade urllib3 * Upgrade certifi package * Remove vim from docker images
1 parent f964848 commit b0365c8

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

docker/Dockerfile

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ ARG TORCHTEXT_VERSION=0.12.0
3434
# Pillow is also installed (so it won't override it with a future pip install), a Pillow stub is included
3535
# PILLOW_PSEUDOVERSION is the Pillow version that pip thinks is installed
3636
# PILLOW_SIMD_VERSION is the actual version of pillow-simd that is installed.
37-
ARG PILLOW_PSEUDOVERSION=7.0.0
38-
ARG PILLOW_SIMD_VERSION=7.0.0.post3
37+
ARG PILLOW_PSEUDOVERSION=9.3.0
38+
ARG PILLOW_SIMD_VERSION=9.0.0.post1
3939

4040
# Version of the Mellanox Drivers to install (for InfiniBand support)
4141
# Leave blank for no Mellanox Drivers
@@ -45,6 +45,12 @@ ARG MOFED_VERSION=5.5-1.0.3.2
4545
# Leave blank for no EFA Drivers
4646
ARG AWS_OFI_NCCL_VERSION=v1.5.0-aws
4747

48+
# Upgrade certifi to resolve CVE-2022-23491
49+
ARG CERTIFI_VERSION='>=2022.12.7'
50+
51+
# Upgrade urllib to resolve CVE-2021-33503
52+
ARG URLLIB3_VERSION='>=1.26.5,<2'
53+
4854
########################
4955
# Vision Image Arguments
5056
########################
@@ -134,7 +140,6 @@ RUN apt-get update && \
134140
automake \
135141
libtool \
136142
# Development tools
137-
vim \
138143
tmux \
139144
htop && \
140145
apt-get autoclean && \
@@ -155,7 +160,7 @@ RUN add-apt-repository ppa:git-core/ppa && \
155160
# Install NodeJS (for Pyright)
156161
##############################
157162
RUN \
158-
curl -fsSL https://deb.nodesource.com/setup_17.x | bash - && \
163+
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
159164
apt-get install -y --no-install-recommends nodejs && \
160165
apt-get autoclean && \
161166
apt-get clean && \
@@ -323,6 +328,22 @@ RUN useradd -rm -d /home/mosaicml -s /bin/bash -u 1000 -U -s /bin/bash mosaicml
323328
usermod -a -G sudo mosaicml && \
324329
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
325330

331+
#########################
332+
# Upgrade apt packages
333+
#########################
334+
RUN apt-get update && \
335+
apt-get upgrade -y && \
336+
apt-get autoclean && \
337+
apt-get clean && \
338+
rm -rf /var/lib/apt/lists/*
339+
340+
#########################
341+
# Upgrade pip packages
342+
#########################
343+
RUN pip install --no-cache-dir --upgrade urllib3${URLLIB3_VERSION} \
344+
certifi${CERTIFI_VERSION}
345+
346+
326347
######################
327348
# PyTorch Vision Image
328349
######################

meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ test:
5454
- fasteners ==0.17.3,<0.18
5555
- pytest >=7.1.0,<8
5656
- toml >=0.10.2,<0.11
57-
- ipython >=8.4.0,<9
57+
- ipython >=8.11.0,<9
5858
- ipykernel ==6.13.1,<7
5959
- jupyter >=1.0.0,<2
6060
- testbook >=0.4.2,<0.5

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def package_files(prefix: str, directory: str, extension: str):
102102
'fasteners==0.18', # object store tests require fasteners
103103
'pytest==7.2.1',
104104
'toml==0.10.2',
105-
'ipython==8.8.0',
105+
'ipython==8.11.0',
106106
'ipykernel==6.20.1',
107107
'jupyter==1.0.0',
108108
'yamllint==1.28.0',

0 commit comments

Comments
 (0)