Skip to content

Commit f18bd05

Browse files
github-actions[bot]claytonparnellSageMaker Distribution Bot
authored
release: v1.6.1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Clayton Parnell <[email protected]> Co-authored-by: SageMaker Distribution Bot <sm-distribution-github-bot[bot]@amazon.com> Co-authored-by: Clayton Parnell <[email protected]>
1 parent 4f15658 commit f18bd05

26 files changed

+1921
-4
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Change log: 1.6.1(cpu)
2+
3+
## Upgrades:
4+
5+
Package | Previous Version | Current Version
6+
---|---|---
7+
python|3.10.13|3.10.14
8+
jupyterlab|4.1.4|4.1.5
9+
notebook|7.1.1|7.1.2
10+
uvicorn|0.28.0|0.28.1
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change log: 1.6.1(gpu)
2+
3+
## Upgrades:
4+
5+
Package | Previous Version | Current Version
6+
---|---|---
7+
jupyterlab|4.1.4|4.1.5
8+
notebook|7.1.1|7.1.2
9+
uvicorn|0.28.0|0.28.1
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
ARG TAG_FOR_BASE_MICROMAMBA_IMAGE
2+
FROM mambaorg/micromamba:$TAG_FOR_BASE_MICROMAMBA_IMAGE
3+
4+
ARG CUDA_MAJOR_MINOR_VERSION=''
5+
ARG ENV_IN_FILENAME
6+
ARG ARG_BASED_ENV_IN_FILENAME
7+
8+
ARG AMZN_BASE="/opt/amazon/sagemaker"
9+
ARG DIRECTORY_TREE_STAGE_DIR="${AMZN_BASE}/dir-staging"
10+
11+
ARG NB_USER="sagemaker-user"
12+
ARG NB_UID=1000
13+
ARG NB_GID=100
14+
15+
# https://www.openssl.org/source/
16+
ARG FIPS_VALIDATED_SSL=3.0.8
17+
18+
ENV SAGEMAKER_LOGGING_DIR="/var/log/sagemaker/"
19+
ENV STUDIO_LOGGING_DIR="/var/log/studio/"
20+
ENV EDITOR="nano"
21+
22+
USER root
23+
RUN usermod "--login=${NB_USER}" "--home=/home/${NB_USER}" --move-home "-u ${NB_UID}" "${MAMBA_USER}" && \
24+
groupmod "--new-name=${NB_USER}" --non-unique "-g ${NB_GID}" "${MAMBA_USER}" && \
25+
# Update the expected value of MAMBA_USER for the
26+
# _entrypoint.sh consistency check.
27+
echo "${NB_USER}" > "/etc/arg_mamba_user" && \
28+
:
29+
ENV MAMBA_USER=$NB_USER
30+
ENV USER=$NB_USER
31+
32+
RUN apt-get update && \
33+
apt-get install -y --no-install-recommends sudo gettext-base wget curl unzip git rsync build-essential openssh-client nano cron less && \
34+
# We just install tzdata below but leave default time zone as UTC. This helps packages like Pandas to function correctly.
35+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata krb5-user libkrb5-dev libsasl2-dev libsasl2-modules && \
36+
chmod g+w /etc/passwd && \
37+
echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
38+
touch /etc/krb5.conf.lock && chown ${NB_USER}:${MAMBA_USER} /etc/krb5.conf* && \
39+
# Note that we do NOT run `rm -rf /var/lib/apt/lists/*` here. If we did, anyone building on top of our images will
40+
# not be able to run any `apt-get install` commands and that would hamper customizability of the images.
41+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
42+
unzip awscliv2.zip && \
43+
sudo ./aws/install && \
44+
rm -rf aws awscliv2.zip && \
45+
:
46+
RUN echo "source /usr/local/bin/_activate_current_env.sh" | tee --append /etc/profile
47+
48+
# CodeEditor - create server, user data dirs
49+
RUN mkdir -p /opt/amazon/sagemaker/sagemaker-code-editor-server-data /opt/amazon/sagemaker/sagemaker-code-editor-user-data \
50+
&& chown $MAMBA_USER:$MAMBA_USER /opt/amazon/sagemaker/sagemaker-code-editor-server-data /opt/amazon/sagemaker/sagemaker-code-editor-user-data
51+
52+
# Merge in OS directory tree contents.
53+
RUN mkdir -p ${DIRECTORY_TREE_STAGE_DIR}
54+
COPY dirs/ ${DIRECTORY_TREE_STAGE_DIR}/
55+
RUN rsync -a ${DIRECTORY_TREE_STAGE_DIR}/ / && \
56+
rm -rf ${DIRECTORY_TREE_STAGE_DIR}
57+
58+
# CodeEditor - download the extensions
59+
RUN mkdir -p /etc/code-editor/extensions && \
60+
while IFS= read -r url || [ -n "$url" ]; do \
61+
echo "Downloading extension from ${url}..." && \
62+
wget --no-check-certificate -P /etc/code-editor/extensions "${url}"; \
63+
done < /etc/code-editor/extensions.txt
64+
65+
USER $MAMBA_USER
66+
COPY --chown=$MAMBA_USER:$MAMBA_USER $ENV_IN_FILENAME *.in /tmp/
67+
68+
# Make sure that $ENV_IN_FILENAME has a newline at the end before the `tee` command runs. Otherwise, nasty things
69+
# will happen.
70+
RUN if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
71+
then echo 'No ARG_BASED_ENV_IN_FILENAME passed' ; \
72+
else envsubst < /tmp/$ARG_BASED_ENV_IN_FILENAME | tee --append /tmp/$ENV_IN_FILENAME ; \
73+
fi
74+
75+
ARG CONDA_OVERRIDE_CUDA=$CUDA_MAJOR_MINOR_VERSION
76+
RUN micromamba install -y --name base --file /tmp/$ENV_IN_FILENAME && \
77+
micromamba clean --all --yes --force-pkgs-dirs && \
78+
rm -rf /tmp/*.in
79+
80+
81+
ARG MAMBA_DOCKERFILE_ACTIVATE=1
82+
RUN sudo ln -s $(which python3) /usr/bin/python
83+
84+
# Configure CodeEditor - Install extensions and set preferences
85+
RUN \
86+
extensionloc=/opt/amazon/sagemaker/sagemaker-code-editor-server-data/extensions && mkdir -p "${extensionloc}" \
87+
# Loop through all vsix files in /etc/code-editor/extensions and install them
88+
&& for ext in /etc/code-editor/extensions/*.vsix; do \
89+
echo "Installing extension ${ext}..."; \
90+
sagemaker-code-editor --install-extension "${ext}" --extensions-dir "${extensionloc}" --server-data-dir /opt/amazon/sagemaker/sagemaker-code-editor-server-data --user-data-dir /opt/amazon/sagemaker/sagemaker-code-editor-user-data; \
91+
done \
92+
# Copy the settings
93+
&& cp /etc/code-editor/code_editor_machine_settings.json /opt/amazon/sagemaker/sagemaker-code-editor-server-data/data/Machine/settings.json
94+
95+
# Install glue kernels, and move to shared directory
96+
# Also patching base kernel so Studio background code doesn't start session silently
97+
RUN install-glue-kernels && \
98+
SITE_PACKAGES=$(pip show aws-glue-sessions | grep Location | awk '{print $2}') && \
99+
jupyter-kernelspec install $SITE_PACKAGES/aws_glue_interactive_sessions_kernel/glue_pyspark --user && \
100+
jupyter-kernelspec install $SITE_PACKAGES/aws_glue_interactive_sessions_kernel/glue_spark --user && \
101+
mv /home/sagemaker-user/.local/share/jupyter/kernels/glue_pyspark /opt/conda/share/jupyter/kernels && \
102+
mv /home/sagemaker-user/.local/share/jupyter/kernels/glue_spark /opt/conda/share/jupyter/kernels && \
103+
sed -i '/if not store_history and (/i\ if "sm_analytics_runtime_check" in code:\n return await self._complete_cell()\n' \
104+
"$SITE_PACKAGES/aws_glue_interactive_sessions_kernel/glue_kernel_base/BaseKernel.py"
105+
106+
107+
# Patch glue kernels to use kernel wrapper
108+
COPY patch_glue_pyspark.json /opt/conda/share/jupyter/kernels/glue_pyspark/kernel.json
109+
COPY patch_glue_spark.json /opt/conda/share/jupyter/kernels/glue_spark/kernel.json
110+
111+
USER root
112+
RUN HOME_DIR="/home/${NB_USER}/licenses" \
113+
&& mkdir -p ${HOME_DIR} \
114+
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \
115+
&& unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \
116+
&& cp ${HOME_DIR}/oss_compliance/test/testOSSCompliance /usr/local/bin/testOSSCompliance \
117+
&& chmod +x /usr/local/bin/testOSSCompliance \
118+
&& chmod +x ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh \
119+
&& ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} python \
120+
&& rm -rf ${HOME_DIR}/oss_compliance*
121+
122+
# Create logging directories for supervisor
123+
RUN mkdir -p $SAGEMAKER_LOGGING_DIR && \
124+
chmod a+rw $SAGEMAKER_LOGGING_DIR && \
125+
mkdir -p ${STUDIO_LOGGING_DIR} && \
126+
chown ${NB_USER}:${MAMBA_USER} ${STUDIO_LOGGING_DIR}
127+
128+
# Clean up CodeEditor artifacts
129+
RUN rm -rf /etc/code-editor
130+
131+
# Create supervisord runtime directory
132+
RUN mkdir -p /var/run/supervisord && \
133+
chmod a+rw /var/run/supervisord
134+
135+
USER $MAMBA_USER
136+
ENV PATH="/opt/conda/bin:/opt/conda/condabin:$PATH"
137+
WORKDIR "/home/${NB_USER}"
138+
139+
# Install FIPS Provider for OpenSSL, on top of existing OpenSSL installation
140+
# v3.0.8 is latest FIPS validated provider, so this is the one we install
141+
# But we need to run tests against the installed version.
142+
# see https://github.com/openssl/openssl/blob/master/README-FIPS.md https://www.openssl.org/source/
143+
RUN INSTALLED_SSL=$(micromamba list | grep openssl | tr -s ' ' | cut -d ' ' -f 3 | head -n 1) && \
144+
# download source code for installed, and FIPS validated openssl versions
145+
curl -L https://www.openssl.org/source/openssl-$FIPS_VALIDATED_SSL.tar.gz > openssl-$FIPS_VALIDATED_SSL.tar.gz && \
146+
curl -L https://www.openssl.org/source/openssl-$INSTALLED_SSL.tar.gz > openssl-$INSTALLED_SSL.tar.gz && \
147+
tar -xf openssl-$FIPS_VALIDATED_SSL.tar.gz && tar -xf openssl-$INSTALLED_SSL.tar.gz && cd openssl-$FIPS_VALIDATED_SSL && \
148+
# Configure both versions to enable FIPS and build
149+
./Configure enable-fips --prefix=/opt/conda --openssldir=/opt/conda/ssl && make && \
150+
cd ../openssl-$INSTALLED_SSL && \
151+
./Configure enable-fips --prefix=/opt/conda --openssldir=/opt/conda/ssl && make && \
152+
# Copy validated provider to installed version for testing
153+
cp ../openssl-$FIPS_VALIDATED_SSL/providers/fips.so providers/. && \
154+
cp ../openssl-$FIPS_VALIDATED_SSL/providers/fipsmodule.cnf providers/. && \
155+
make tests && cd ../openssl-$FIPS_VALIDATED_SSL && \
156+
# After tests pass, install FIPS provider and remove source code
157+
make install_fips && cd .. && rm -rf ./openssl-*
158+
# Create new config file with fips-enabled. Then user can override OPENSSL_CONF to enable FIPS
159+
# e.g. export OPENSSL_CONF=/opt/conda/ssl/openssl-fips.cnf
160+
RUN cp /opt/conda/ssl/openssl.cnf /opt/conda/ssl/openssl-fips.cnf && \
161+
sed -i "s:# .include fipsmodule.cnf:.include /opt/conda/ssl/fipsmodule.cnf:" /opt/conda/ssl/openssl-fips.cnf && \
162+
sed -i 's:# fips = fips_sect:fips = fips_sect:' /opt/conda/ssl/openssl-fips.cnf
163+
ENV OPENSSL_MODULES=/opt/conda/lib64/ossl-modules/
164+
165+
# Install Kerberos.
166+
# Make sure no dependency is added/updated
167+
RUN pip install "krb5>=0.5.1,<0.6" && \
168+
pip show krb5 | grep Require | xargs -i sh -c '[ $(echo {} | cut -d: -f2 | wc -w) -eq 0 ] '
169+
170+
# https://stackoverflow.com/questions/122327
171+
RUN SYSTEM_PYTHON_PATH=$(python3 -c "from __future__ import print_function;import sysconfig; print(sysconfig.get_paths().get('purelib'))") && \
172+
# Remove SparkRKernel as it's not supported \
173+
jupyter-kernelspec remove -f -y sparkrkernel && \
174+
# Patch Sparkmagic lib to support Custom Certificates \
175+
# https://github.com/jupyter-incubator/sparkmagic/pull/435/files \
176+
cp -a ${SYSTEM_PYTHON_PATH}/sagemaker_studio_analytics_extension/patches/configuration.py ${SYSTEM_PYTHON_PATH}/sparkmagic/utils/ && \
177+
cp -a ${SYSTEM_PYTHON_PATH}/sagemaker_studio_analytics_extension/patches/reliablehttpclient.py ${SYSTEM_PYTHON_PATH}/sparkmagic/livyclientlib/reliablehttpclient.py && \
178+
sed -i 's= "python"= "/opt/conda/bin/python"=g' /opt/conda/share/jupyter/kernels/pysparkkernel/kernel.json /opt/conda/share/jupyter/kernels/sparkkernel/kernel.json && \
179+
sed -i 's="Spark"="SparkMagic Spark"=g' /opt/conda/share/jupyter/kernels/sparkkernel/kernel.json && \
180+
sed -i 's="PySpark"="SparkMagic PySpark"=g' /opt/conda/share/jupyter/kernels/pysparkkernel/kernel.json
181+
182+
ENV SHELL=/bin/bash
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Release notes: 1.6.1
2+
3+
Package | gpu| cpu
4+
---|---|---
5+
python|3.10.13|3.10.14
6+
numpy|1.26.4|1.26.4
7+
jinja2|3.1.3|3.1.3
8+
pandas|2.1.4|2.1.4
9+
altair|5.2.0|5.2.0
10+
boto3|1.34.51|1.34.51
11+
ipython|8.22.2|8.22.2
12+
jupyter-lsp|2.2.4|2.2.4
13+
jupyterlab|4.1.5|4.1.5
14+
amazon-codewhisperer-jupyterlab-ext|2.0.1|2.0.1
15+
jupyter-scheduler|2.5.1|2.5.1
16+
amazon-sagemaker-jupyter-scheduler|3.0.7|3.0.7
17+
amazon-sagemaker-sql-magic|0.1.0|0.1.0
18+
jupyterlab-lsp|5.0.3|5.0.3
19+
amazon_sagemaker_sql_editor|0.1.3|0.1.3
20+
scipy|1.11.4|1.11.4
21+
scikit-learn|1.4.1.post1|1.4.1.post1
22+
pip|23.3.2|23.3.2
23+
torchvision|0.15.2|0.15.2
24+
autogluon|0.8.2|0.8.2
25+
ipywidgets|8.1.2|8.1.2
26+
notebook|7.1.2|7.1.2
27+
aws-glue-sessions|1.0.4|1.0.4
28+
conda|23.11.0|23.11.0
29+
fastapi|0.103.2|0.103.2
30+
langchain|0.1.9|0.1.9
31+
jupyter-ai|2.11.0|2.11.0
32+
jupyter-dash|0.4.2|0.4.2
33+
jupyter-server-proxy|4.1.2|4.1.2
34+
jupyterlab-git|0.50.0|0.50.0
35+
keras|2.12.0|2.12.0
36+
matplotlib|3.8.3|3.8.3
37+
nodejs|18.19.0|18.19.0
38+
py-xgboost-gpu|1.7.6|
39+
thrift_sasl|0.4.3|0.4.3
40+
pyhive|0.7.0|0.7.0
41+
python-gssapi|1.8.3|1.8.3
42+
python-lsp-server|1.10.1|1.10.1
43+
pytorch-gpu|2.0.0|
44+
sagemaker-code-editor|1.0.0|1.0.0
45+
sagemaker-headless-execution-driver|0.0.12|0.0.12
46+
sagemaker-jupyterlab-emr-extension|0.1.9|0.1.9
47+
sagemaker-jupyterlab-extension|0.2.0|0.2.0
48+
sagemaker-kernel-wrapper|0.0.2|0.0.2
49+
sagemaker-python-sdk|2.212.0|2.212.0
50+
sagemaker-studio-analytics-extension|0.0.21|0.0.21
51+
sasl|0.3.1|0.3.1
52+
supervisor|4.2.5|4.2.5
53+
tensorflow|2.12.1|2.12.1
54+
uvicorn|0.28.1|0.28.1
55+
pytorch| |2.0.0
56+
py-xgboost-cpu| |1.7.6
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This file is auto-generated.
2+
conda-forge::sagemaker-code-editor[version='>=1.0.0,<1.1.0']
3+
conda-forge::amazon_sagemaker_sql_editor[version='>=0.1.3,<0.2.0']
4+
conda-forge::amazon-sagemaker-sql-magic[version='>=0.1.0,<0.2.0']
5+
conda-forge::langchain[version='>=0.1.9,<0.2.0']
6+
conda-forge::fastapi[version='>=0.103.2,<0.104.0']
7+
conda-forge::uvicorn[version='>=0.28.0,<0.29.0']
8+
conda-forge::pytorch[version='>=2.0.0,<2.1.0']
9+
conda-forge::tensorflow[version='>=2.12.1,<2.13.0']
10+
conda-forge::python[version='>=3.10.13,<3.11.0']
11+
conda-forge::pip[version='>=23.3.2,<23.4.0']
12+
conda-forge::torchvision[version='>=0.15.2,<0.16.0']
13+
conda-forge::numpy[version='>=1.26.4,<1.27.0']
14+
conda-forge::pandas[version='>=2.1.4,<2.2.0']
15+
conda-forge::scikit-learn[version='>=1.4.1.post1,<1.5.0']
16+
conda-forge::jinja2[version='>=3.1.3,<3.2.0']
17+
conda-forge::matplotlib[version='>=3.8.3,<3.9.0']
18+
conda-forge::sagemaker-headless-execution-driver[version='>=0.0.12,<0.1.0']
19+
conda-forge::ipython[version='>=8.22.2,<8.23.0']
20+
conda-forge::scipy[version='>=1.11.4,<1.12.0']
21+
conda-forge::keras[version='>=2.12.0,<2.13.0']
22+
conda-forge::py-xgboost-cpu[version='>=1.7.6,<1.8.0']
23+
conda-forge::jupyterlab[version='>=4.1.4,<4.2.0']
24+
conda-forge::ipywidgets[version='>=8.1.2,<8.2.0']
25+
conda-forge::conda[version='>=23.11.0,<23.12.0']
26+
conda-forge::boto3[version='>=1.34.51,<1.35.0']
27+
conda-forge::sagemaker-python-sdk[version='>=2.212.0,<2.213.0']
28+
conda-forge::supervisor[version='>=4.2.5,<4.3.0']
29+
conda-forge::autogluon[version='>=0.8.2,<0.9.0']
30+
conda-forge::aws-glue-sessions[version='>=1.0.4,<1.1.0']
31+
conda-forge::sagemaker-kernel-wrapper[version='>=0.0.2,<0.1.0']
32+
conda-forge::jupyter-ai[version='>=2.11.0,<2.12.0']
33+
conda-forge::jupyter-scheduler[version='>=2.5.1,<2.6.0']
34+
conda-forge::nodejs[version='>=18.19.0,<18.20.0']
35+
conda-forge::jupyter-lsp[version='>=2.2.4,<2.3.0']
36+
conda-forge::jupyterlab-lsp[version='>=5.0.3,<5.1.0']
37+
conda-forge::python-lsp-server[version='>=1.10.1,<1.11.0']
38+
conda-forge::notebook[version='>=7.1.1,<7.2.0']
39+
conda-forge::altair[version='>=5.2.0,<5.3.0']
40+
conda-forge::sagemaker-studio-analytics-extension[version='>=0.0.21,<0.1.0']
41+
conda-forge::jupyter-dash[version='>=0.4.2,<0.5.0']
42+
conda-forge::sagemaker-jupyterlab-extension[version='>=0.2.0,<0.3.0']
43+
conda-forge::sagemaker-jupyterlab-emr-extension[version='>=0.1.9,<0.2.0']
44+
conda-forge::amazon-sagemaker-jupyter-scheduler[version='>=3.0.7,<3.1.0']
45+
conda-forge::jupyter-server-proxy[version='>=4.1.2,<4.2.0']
46+
conda-forge::amazon-codewhisperer-jupyterlab-ext[version='>=2.0.1,<2.1.0']
47+
conda-forge::jupyterlab-git[version='>=0.50.0,<0.51.0']
48+
conda-forge::sasl[version='>=0.3.1,<0.4.0']
49+
conda-forge::thrift_sasl[version='>=0.4.3,<0.5.0']
50+
conda-forge::pyhive[version='>=0.7.0,<0.8.0']
51+
conda-forge::python-gssapi[version='>=1.8.3,<1.9.0']

0 commit comments

Comments
 (0)