@@ -49,7 +49,7 @@ ENV MAMBA_USER=$NB_USER
4949ENV USER=$NB_USER
5050
5151RUN apt-get update && apt-get upgrade -y && \
52- apt-get install -y --no-install-recommends sudo gettext-base wget curl unzip git rsync build-essential openssh-client nano cron less mandoc && \
52+ apt-get install -y --no-install-recommends sudo gettext-base wget curl unzip git rsync build-essential openssh-client nano cron less mandoc jq ca-certificates gnupg && \
5353 # We just install tzdata below but leave default time zone as UTC. This helps packages like Pandas to function correctly.
5454 DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata krb5-user libkrb5-dev libsasl2-dev libsasl2-modules && \
5555 chmod g+w /etc/passwd && \
@@ -90,7 +90,8 @@ ARG CONDA_OVERRIDE_CUDA=$CUDA_MAJOR_MINOR_VERSION
9090
9191# Make sure that $ENV_IN_FILENAME and $PINNED_ENV_IN_FILENAME has a newline at the end before the `tee` command runs.
9292# Otherwise, nasty things will happen.
93- RUN if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
93+ RUN --mount=type=bind,source=./patched-packages,target=/tmp/patched-packages \
94+ if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
9495 then echo 'No ARG_BASED_ENV_IN_FILENAME passed' ; \
9596 else envsubst < /tmp/$ARG_BASED_ENV_IN_FILENAME | tee --append /tmp/$ENV_IN_FILENAME ; \
9697 fi && \
@@ -172,7 +173,9 @@ RUN if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
172173 sed -i 's="Spark"="SparkMagic Spark"=g' /opt/conda/share/jupyter/kernels/sparkkernel/kernel.json && \
173174 sed -i 's="PySpark"="SparkMagic PySpark"=g' /opt/conda/share/jupyter/kernels/pysparkkernel/kernel.json && \
174175 # Configure RTC - disable jupyter_collaboration by default
175- jupyter labextension disable @jupyter/collaboration-extension
176+ jupyter labextension disable @jupyter/collaboration-extension && \
177+ /etc/patches/apply_patches.sh && \
178+ sudo rm -rf /etc/patches
176179
177180# Patch glue kernels to use kernel wrapper
178181COPY patch_glue_pyspark.json /opt/conda/share/jupyter/kernels/glue_pyspark/kernel.json
@@ -185,7 +188,9 @@ RUN mkdir -p $SAGEMAKER_LOGGING_DIR && \
185188 chmod a+rw $SAGEMAKER_LOGGING_DIR && \
186189 mkdir -p ${STUDIO_LOGGING_DIR} && \
187190 chown ${NB_USER}:${MAMBA_USER} ${STUDIO_LOGGING_DIR} && \
188-
191+ # Create sagemaker pysdk admin default config directory
192+ mkdir -p /etc/xdg/sagemaker && \
193+ chmod a+rw /etc/xdg/sagemaker && \
189194 # Clean up CodeEditor artifacts
190195 rm -rf /etc/code-editor && \
191196 # Create supervisord runtime directory
0 commit comments