Skip to content

Commit 933c7ca

Browse files
author
Malav Shastri
committed
Address CVEs
1 parent 07ece4c commit 933c7ca

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

docker/1.3-1/base/Dockerfile.cpu

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ ARG CONDA_PY_VERSION=39
99
ARG CONDA_CHECKSUM="b4e46fcc8029e2cfa731b788f25b1d36"
1010
ARG CONDA_PKG_VERSION=4.10.1
1111
ARG PYTHON_VERSION=3.7.10
12-
ARG PYARROW_VERSION=1.0
13-
ARG MLIO_VERSION=0.7.0
12+
ARG PYARROW_VERSION=14.0.1
13+
ARG MLIO_VERSION=0.9.0
1414
ARG XGBOOST_VERSION=1.3.3
1515

1616
ENV DEBIAN_FRONTEND=noninteractive
@@ -44,6 +44,8 @@ RUN rm /etc/apt/sources.list.d/cuda.list && \
4444
# MLIO build dependencies
4545
# Official Ubuntu APT repositories do not contain an up-to-date version of CMake required to build MLIO.
4646
# Kitware contains the latest version of CMake.
47+
wget http://es.archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb && \
48+
dpkg -i libffi7_3.3-4_amd64.deb && \
4749
apt-get -y install --no-install-recommends \
4850
apt-transport-https \
4951
ca-certificates \
@@ -113,7 +115,7 @@ RUN echo "conda ${CONDA_PKG_VERSION}" >> /miniconda3/conda-meta/pinned && \
113115
python3 -m pip install typing && \
114116
python3 -m pip install --upgrade pip && \
115117
python3 -m pip install dist/*.whl && \
116-
cp -r /tmp/mlio/build/third-party/lib/intel64/gcc4.7/* /usr/local/lib/ && \
118+
cp -r /tmp/mlio/build/third-party/lib/libtbb* /usr/local/lib/ && \
117119
ldconfig && \
118120
rm -rf /tmp/mlio
119121

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gunicorn==19.10.0
88
itsdangerous==2.0.1
99
matplotlib==3.4.1
1010
multi-model-server==1.1.2
11-
numpy==1.21.6
11+
numpy==1.24.1
1212
pandas==1.2.4
1313
protobuf==3.20.1
1414
psutil==5.6.7 # sagemaker-containers requires psutil 5.6.7
@@ -24,3 +24,5 @@ wheel==0.36.2
2424
jinja2==2.10.2
2525
MarkupSafe==1.1.1
2626
Werkzeug==0.15.6
27+
certifi==2023.7.22
28+
gevent==23.9.1

src/sagemaker_xgboost_container/algorithm_mode/serve_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def _get_sparse_matrix_from_libsvm(payload):
9191
data.append(val)
9292

9393
row = np.array(row)
94-
col = np.array(col).astype(np.int)
95-
data = np.array(data).astype(np.float)
94+
col = np.array(col).astype(int)
95+
data = np.array(data).astype(float)
9696
if not (len(row) == len(col) and len(col) == len(data)):
9797
raise RuntimeError("Dimension checking failed when transforming sparse matrix.")
9898

@@ -106,7 +106,7 @@ def parse_content_data(input_data, input_content_type):
106106
if content_type == CSV:
107107
try:
108108
decoded_payload = payload.strip().decode("utf-8")
109-
dtest = encoder.csv_to_dmatrix(decoded_payload, dtype=np.float)
109+
dtest = encoder.csv_to_dmatrix(decoded_payload, dtype=float)
110110
except Exception as e:
111111
raise RuntimeError("Loading csv data failed with Exception, "
112112
"please ensure data is in csv format:\n {}\n {}".format(type(e), e))

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ deps =
1717
-r{toxinidir}/requirements.txt
1818
-r{toxinidir}/test-requirements.txt
1919
conda_deps=
20-
pyarrow==1.0.1
20+
pyarrow==14.0.1
2121
tbb==2020.2
22-
mlio-py==0.7.0
22+
mlio-py==0.9.0
2323
conda_channels=
2424
conda-forge
2525
mlio

0 commit comments

Comments
 (0)