Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
3dc6380
Building for training TF 2.19 EC2
May 8, 2025
bd6674d
[TensorFlow][Training][EC2] TensorFlow 2.19.0 Currency Release
May 8, 2025
c3259be
[TensorFlow][Training][EC2] TensorFlow 2.19.0 Currency Release
May 8, 2025
cd16864
[TensorFlow][Training][EC2] TensorFlow 2.19.0 Currency Release
May 8, 2025
80faa58
[TensorFlow][Training][EC2] TensorFlow 2.19.0 Currency Release
May 8, 2025
edfaf85
[TensorFlow][Training][EC2] TensorFlow 2.19.0 Currency Release
May 8, 2025
9eb5188
[TensorFlow][Training][EC2] TensorFlow 2.19.0 Currency Release
May 8, 2025
3db0623
Added buildspec-2-19-sm.yml file and made other changes to build sm i…
May 8, 2025
45502f6
Merge branch 'master' into TF2.19
bhanutejagk May 8, 2025
70408d0
commented autopatch_build line in buildspec
May 8, 2025
f8bd89a
Commented out SMP_URL and its installation code logic
May 8, 2025
7087d67
Added logic for timout and retry for failed downloads
May 8, 2025
9d58e54
Resolved error due to '=' instead of '=='
May 9, 2025
2a7ef55
Modified 'default-timeout' to '--default-timeout'
May 9, 2025
ef5743b
Merge branch 'master' into TF2.19
bhanutejagk May 9, 2025
b38268a
Merge branch 'master' into TF2.19
bhanutejagk May 12, 2025
6b02887
Merge branch 'master' into TF2.19
bhanutejagk May 12, 2025
dea10d5
changed build to false
May 12, 2025
11d7cb7
Skipped tests which lead to failures and updated python version to 312
May 13, 2025
845638d
Merge branch 'master' into TF2.19
bhanutejagk May 13, 2025
7fcd1e9
debugging with print statements in test_pip_check
May 13, 2025
8aa3c2a
Added decorater to skip the sagemaker tests as sm profiler binary is …
May 14, 2025
f7acca8
modified dlc_template.py and added copy command to dockerfiles for si…
May 14, 2025
34f04c4
Building the image since copy command in docker files is added
May 14, 2025
169a633
Modified main to remove telemetry test failures
May 14, 2025
fa1b332
Pinned previous versions for tensorflow-datasets & tensorflow-metadat…
May 14, 2025
3bd7184
added 3.12 py_version as not included previously
May 14, 2025
66e090e
added 2 allowlist files to handle unremovable errors
May 14, 2025
84ff7e3
reverted back to py3.10 from py 3.12 as protobuf confict occurs and c…
May 15, 2025
10a1b4f
removed prev tags to tensorflow metadata since we reverted back to 3.…
May 16, 2025
b0cf14c
Merge branch 'master' into TF2.19
bhanutejagk May 16, 2025
ae2f718
changed tensorflow-metadata version as it is incompatible with protobuf
May 16, 2025
a292530
building updated image after yadans push
May 27, 2025
b5a0c41
Building for training TF 2.19 EC2
May 8, 2025
eb68e6f
added telemetry to bashrc and entrypoint
May 28, 2025
fe06f1f
Added cross-spawn allownlist code to remove sanity test errors
May 29, 2025
58dd208
removed build as we only change is made to remove test errors
May 29, 2025
2af2427
deleted extra docker files and rebuilding image
May 29, 2025
87bfd61
Merge branch 'master' into TF2.19
bhanutejagk May 29, 2025
5df4eff
added telemtry to bashrc and entrypoint
May 29, 2025
2ae1a6f
doing build
May 29, 2025
626a4fa
Added logic for timout and retry for failed downloads
May 8, 2025
6906342
Resolved error due to '=' instead of '=='
May 9, 2025
d4d006d
Modified 'default-timeout' to '--default-timeout'
May 9, 2025
3a14eda
changed build to false
May 12, 2025
37ccd15
Skipped tests which lead to failures and updated python version to 312
May 13, 2025
68739b6
modified dlc_template.py and added copy command to dockerfiles for si…
May 14, 2025
ab3b7a5
Building the image since copy command in docker files is added
May 14, 2025
af26262
added 3.12 py_version as not included previously
May 14, 2025
c69b8dd
reverted back to py3.10 from py 3.12 as protobuf confict occurs and c…
May 15, 2025
73b542a
building updated image after yadans push
May 27, 2025
9672506
reverted back correct changes from conflicts while rebasing
May 30, 2025
a5a9119
changed code for adding telemetry
May 30, 2025
8eee9f7
added dockerd_ec2_entyrpoint in buildspec
May 30, 2025
d30fa44
Merge branch 'master' into TF2.19
Jun 11, 2025
23a7d83
updating py to 3.12 as sagemaker toolkit blocker removed
Jun 11, 2025
8e40217
added 312 in test_training.py and in conftest.py as latest version
Jun 16, 2025
3ec8768
Merge remote-tracking branch 'upstream/master' into TF2.19
Jun 17, 2025
9d4a751
Installed rust and cargo & modified sagemaker-training to <5.0
Jun 17, 2025
5ed527f
removed the version constraints on sagemaker-training and y-py
Jun 17, 2025
2d7de83
modified RUST installation section
Jun 18, 2025
b2956a5
removed source command in rust installation
Jun 18, 2025
66fec1b
modified range for sagemaker version to install
Jun 18, 2025
a69fc39
Merge branch 'master' into TF2.19
Jun 18, 2025
bddcb90
removed pins for sagemaker relevant packages to see if it can find a …
Jun 19, 2025
7878509
modified code for telemetry entrypoints
Jun 19, 2025
2dac2b9
Merge branch 'master' into TF2.19
Jun 19, 2025
463cc91
added cve's to allow list and modified telemetry code
Jun 19, 2025
f078c25
Rerunning sagemaker-local-tests and sanity tests
Jun 20, 2025
816ca58
Removed sitecustomize file in docker files
Jun 20, 2025
10d688c
reverted change in 2.18 file which by mistake was changed to 2.19
Jun 20, 2025
80ea17d
building image and testing sanity tests.
Jun 20, 2025
f3b71d3
removed protobuf version constraint as sagemaker-training-toolkit is …
Jun 20, 2025
f8c6346
Merge branch 'master' into TF2.19
Jun 20, 2025
e7298a9
running all basic tests
Jun 20, 2025
0b80737
Testing image with deep tests
Jun 20, 2025
ae34cb8
enabled further testing
Jun 20, 2025
619c83b
reverting back toml file
Jun 20, 2025
07d8973
reverted back dlc_template file
Jun 20, 2025
be4f400
removed unwanted commented lines in docker files
Jun 21, 2025
38a0eac
formatted code using black
Jun 23, 2025
990f6bb
downgraded the black version to 23.12.1 and formatted the files
Jun 23, 2025
694f98a
changes done based on review. refactoring and minor changes
Jun 25, 2025
0f8bc9e
building image
Jun 25, 2025
ca19de7
refactoring code and checking if it works
Jun 25, 2025
09e9185
Merge branch 'master' into TF2.19
Jun 25, 2025
d4dca1c
trying to build the image since it failed previously
Jun 25, 2025
d422c3d
modified code for PYTHON, PYTHON_VERSION from ARG to ENV
Jun 26, 2025
20ba3a0
Merge branch 'master' into TF2.19
Jun 26, 2025
7dcd20b
modified specifier set to skip TF2.19
Jun 30, 2025
0c6030a
Merge branch 'master' into TF2.19
Jun 30, 2025
57a089b
reverting back toml file
Jun 30, 2025
12cd290
1. modifed SpecifierSet as <2.19
Jun 30, 2025
0d6f901
building the image and running basic tests
Jun 30, 2025
ebfd77a
Merge branch 'master' into TF2.19
Jun 30, 2025
0e7da95
building training image and running basic tests
Jul 1, 2025
1f37522
corrected a syntax error due to '\'
Jul 1, 2025
2d75869
corrected a typo for TF_VERSION
Jul 1, 2025
0d290df
added TF_VERSION to ec2 stage
Jul 1, 2025
be26d98
fix: correct tf-models-official version string formatting
Jul 1, 2025
ca63142
created an ENV variable TF_VERSION to pass to ec2 and sagemaker stages
Jul 1, 2025
4186d27
running further tests disabling build
Jul 1, 2025
7d296c1
reverting back toml file
Jul 1, 2025
f6c7c2e
Merge branch 'master' into TF2.19
Jul 1, 2025
2db2329
removed print statements in test_pre_release.py file and running ec2_…
Jul 1, 2025
1b45642
reverting back toml file after formatting with black
Jul 1, 2025
f2f56b0
Merge branch 'master' into TF2.19
Jul 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions tensorflow/training/buildspec-2-19-sm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
account_id: &ACCOUNT_ID <set-$ACCOUNT_ID-in-environment>
prod_account_id: &PROD_ACCOUNT_ID 763104351884
region: &REGION <set-$REGION-in-environment>
framework: &FRAMEWORK tensorflow
version: &VERSION 2.19.0
short_version: &SHORT_VERSION "2.19"
arch_type: x86
#autopatch_build: "True"

repository_info:
training_repository: &TRAINING_REPOSITORY
image_type: &TRAINING_IMAGE_TYPE training
root: !join [ *FRAMEWORK, "/", *TRAINING_IMAGE_TYPE ]
repository_name: &REPOSITORY_NAME !join [pr, "-", *FRAMEWORK, "-", *TRAINING_IMAGE_TYPE]
repository: &REPOSITORY !join [ *ACCOUNT_ID, .dkr.ecr., *REGION, .amazonaws.com/, *REPOSITORY_NAME ]
release_repository_name: &RELEASE_REPOSITORY_NAME !join [ *FRAMEWORK, "-", *TRAINING_IMAGE_TYPE ]
release_repository: &RELEASE_REPOSITORY !join [ *PROD_ACCOUNT_ID, .dkr.ecr., *REGION, .amazonaws.com/,
*RELEASE_REPOSITORY_NAME ]

context:
training_context: &TRAINING_CONTEXT
start_cuda_compat:
source: docker/build_artifacts/start_cuda_compat.sh
target: start_cuda_compat.sh
dockerd-entrypoint:
source: docker/build_artifacts/dockerd-entrypoint.py
target: dockerd-entrypoint.py
dockerd_ec2_entrypoint:
source: docker/build_artifacts/dockerd_ec2_entrypoint.sh
target: dockerd_ec2_entrypoint.sh
deep_learning_container:
source: ../../src/deep_learning_container.py
target: deep_learning_container.py

images:
BuildTensorflowSageMakerCpuPy310TrainingDockerImage:
<<: *TRAINING_REPOSITORY
build: &TENSORFLOW_CPU_TRAINING_PY3 false
image_size_baseline: &IMAGE_SIZE_BASELINE 7500
device_type: &DEVICE_TYPE cpu
python_version: &DOCKER_PYTHON_VERSION py3
tag_python_version: &TAG_PYTHON_VERSION py312
os_version: &OS_VERSION ubuntu22.04
tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *OS_VERSION, "-sagemaker" ]
latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *OS_VERSION, "-sagemaker" ]
docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /Dockerfile., *DEVICE_TYPE ]
# build_tag_override: "pr:2.16.2-cpu-py310-ubuntu20.04-sagemaker-pr-4362-autopatch"
target: sagemaker
enable_test_promotion: true
context:
<<: *TRAINING_CONTEXT
BuildTensorflowSageMakerGpuPy310Cu125TrainingDockerImage:
<<: *TRAINING_REPOSITORY
build: &TENSORFLOW_GPU_TRAINING_PY3 false
image_size_baseline: &IMAGE_SIZE_BASELINE 11998
device_type: &DEVICE_TYPE gpu
python_version: &DOCKER_PYTHON_VERSION py3
tag_python_version: &TAG_PYTHON_VERSION py312
cuda_version: &CUDA_VERSION cu125
os_version: &OS_VERSION ubuntu22.04
tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *CUDA_VERSION, "-", *OS_VERSION, "-sagemaker" ]
latest_release_tag: !join [ *VERSION, "-", *DEVICE_TYPE, "-", *TAG_PYTHON_VERSION, "-", *CUDA_VERSION, "-", *OS_VERSION, "-sagemaker" ]
docker_file: !join [ docker/, *SHORT_VERSION, /, *DOCKER_PYTHON_VERSION, /, *CUDA_VERSION, /Dockerfile., *DEVICE_TYPE ]
# build_tag_override: "pr:2.16.2-gpu-py310-cu123-ubuntu20.04-sagemaker-pr-4362-autopatch"
target: sagemaker
enable_test_promotion: true
context:
<<: *TRAINING_CONTEXT
2 changes: 1 addition & 1 deletion tensorflow/training/buildspec.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
buildspec_pointer: buildspec-2-18-sm.yml
buildspec_pointer: buildspec-2-19-sm.yml
319 changes: 319 additions & 0 deletions tensorflow/training/docker/2.19/py3/Dockerfile.cpu
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
ARG TF_URL=https://storage.googleapis.com/tensorflow/versions/2.19.0/tensorflow_cpu-2.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

FROM ubuntu:22.04 AS base_image

ENV DEBIAN_FRONTEND=noninteractive \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

FROM base_image AS common

LABEL maintainer="Amazon AI"
LABEL dlc_major_version="1"

# Declaring ARG values
ARG TF_VERSION=2.19
ARG PYTHON=python3.12
ARG PYTHON_VERSION=3.12.11
ARG PIP=pip3
ARG OMPI_VERSION=4.1.8

# To be passed to ec2 and sagemaker stages
ENV TF_VERSION=${TF_VERSION}
ENV PYTHON=${PYTHON}
ENV PYTHON_VERSION=${PYTHON_VERSION}

ENV PIP=${PIP}

# prevent stopping by user interaction
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Set environment variables for MKL
# For more about MKL with TensorFlow see:
# https://www.tensorflow.org/performance/performance_guide#tensorflow_with_intel%C2%AE_mkl_dnn
ENV KMP_AFFINITY=granularity=fine,compact,1,0
ENV KMP_BLOCKTIME=1
ENV KMP_SETTINGS=0

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
openssh-client \
openssh-server \
ca-certificates \
curl \
emacs \
git \
libtemplate-perl \
openssl \
protobuf-compiler \
unzip \
wget \
vim \
zlib1g-dev \
# Install dependent library for OpenCV
libgtk2.0-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# Install Open MPI
RUN mkdir /tmp/openmpi \
&& cd /tmp/openmpi \
&& wget --quiet https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-${OMPI_VERSION}.tar.gz \
&& tar zxf openmpi-${OMPI_VERSION}.tar.gz \
&& cd openmpi-${OMPI_VERSION} \
&& ./configure --enable-orterun-prefix-by-default \
&& make -j $(nproc) all \
&& make install \
&& ldconfig \
&& rm -rf /tmp/openmpi

# Create a wrapper for OpenMPI to allow running as root by default
RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real \
&& echo '#!/bin/bash' > /usr/local/bin/mpirun \
&& echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun \
&& chmod a+x /usr/local/bin/mpirun

RUN echo "hwloc_base_binding_policy = none" >> /usr/local/etc/openmpi-mca-params.conf \
&& echo "rmaps_base_mapping_policy = slot" >> /usr/local/etc/openmpi-mca-params.conf

ENV LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
ENV PATH /usr/local/openmpi/bin/:$PATH

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

# Create SSH key.
RUN mkdir -p /root/.ssh/ \
&& mkdir -p /var/run/sshd \
&& ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa \
&& cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys \
&& printf "Host *\n StrictHostKeyChecking no\n" >> /root/.ssh/config

WORKDIR /

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libffi-dev \
libgdbm-dev \
liblzma-dev \
libncursesw5-dev \
libsqlite3-dev \
libssl-dev \
tk-dev \
ffmpeg \
libsm6 \
libxext6 \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
&& tar -xvf Python-$PYTHON_VERSION.tgz \
&& cd Python-$PYTHON_VERSION \
&& ./configure \
&& make -j $(nproc) \
&& make install \
&& rm -rf ../Python-$PYTHON_VERSION*

RUN ${PIP} --no-cache-dir install --upgrade \
pip \
setuptools

# Some TF tools expect a "python" binary
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
&& ln -s $(which ${PIP}) /usr/bin/pip

RUN ${PIP} install --no-cache-dir -U \
pybind11 \
cmake \
scipy \
Pillow \
python-dateutil \
requests \
"awscli<2" \
urllib3 \
mpi4py \
# Let's install TensorFlow separately in the end to avoid
# the library version to be overwritten
&& ${PIP} install --no-cache-dir -U \
h5py \
absl-py \
opencv-python \
werkzeug \
psutil \
protobuf

ADD https://raw.githubusercontent.com/aws/deep-learning-containers/master/src/deep_learning_container.py /usr/local/bin/deep_learning_container.py

RUN chmod +x /usr/local/bin/deep_learning_container.py

COPY bash_telemetry.sh /usr/local/bin/bash_telemetry.sh
RUN chmod +x /usr/local/bin/bash_telemetry.sh
RUN echo 'source /usr/local/bin/bash_telemetry.sh' >> /etc/bash.bashrc

COPY dockerd_ec2_entrypoint.sh /usr/local/bin/dockerd_entrypoint.sh
RUN chmod +x /usr/local/bin/dockerd_entrypoint.sh

RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow-${TF_VERSION}/license.txt -o /license.txt

########################################################
# _____ ____ ____ ___
# | ____/ ___|___ \ |_ _|_ __ ___ __ _ __ _ ___
# | _|| | __) | | || '_ ` _ \ / _` |/ _` |/ _ \
# | |__| |___ / __/ | || | | | | | (_| | (_| | __/
# |_____\____|_____| |___|_| |_| |_|\__,_|\__, |\___|
# |___/
# ____ _
# | _ \ ___ ___(_)_ __ ___
# | |_) / _ \/ __| | '_ \ / _ \
# | _ < __/ (__| | |_) | __/
# |_| \_\___|\___|_| .__/ \___|
# |_|
########################################################

FROM common AS ec2
ARG TF_URL

RUN ${PIP} install --no-cache-dir -U \
${TF_URL} \
"tensorflow-io==0.37.*" \
tensorflow-datasets

RUN HOME_DIR=/root \
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \
&& unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \
&& cp ${HOME_DIR}/oss_compliance/test/testOSSCompliance /usr/local/bin/testOSSCompliance \
&& chmod +x /usr/local/bin/testOSSCompliance \
&& chmod +x ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh \
&& ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} ${PYTHON} \
&& rm -rf ${HOME_DIR}/oss_compliance*

# remove tmp files
RUN rm -rf /tmp/*

ENTRYPOINT ["bash", "-m", "/usr/local/bin/dockerd_entrypoint.sh"]

CMD ["/bin/bash"]

#################################################################
# ____ __ __ _
# / ___| __ _ __ _ ___| \/ | __ _| | _____ _ __
# \___ \ / _` |/ _` |/ _ \ |\/| |/ _` | |/ / _ \ '__|
# ___) | (_| | (_| | __/ | | | (_| | < __/ |
# |____/ \__,_|\__, |\___|_| |_|\__,_|_|\_\___|_|
# |___/
# ___ ____ _
# |_ _|_ __ ___ __ _ __ _ ___ | _ \ ___ ___(_)_ __ ___
# | || '_ ` _ \ / _` |/ _` |/ _ \ | |_) / _ \/ __| | '_ \ / _ \
# | || | | | | | (_| | (_| | __/ | _ < __/ (__| | |_) | __/
# |___|_| |_| |_|\__,_|\__, |\___| |_| \_\___|\___|_| .__/ \___|
# |___/ |_|
#################################################################

FROM common AS sagemaker

LABEL maintainer="Amazon AI"
LABEL dlc_major_version="1"

ARG TF_URL

# sagemaker-specific environment variable
ENV SAGEMAKER_TRAINING_MODULE sagemaker_tensorflow_container.training:main

# dependencies for opencv
# these dependencies are not needed for gpu image
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libgtk2.0-dev \
libkrb5-dev \
libsasl2-dev \
libsasl2-modules \
krb5-user \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# https://github.com/yaml/pyyaml/issues/601
# PyYaml less than 6.0.1 failes to build with cython v3 and above.
# tf-models-official uses older versions, breaking the install.
# going to install the older pyyaml and cython to get tfd-models-official
# the sagemaker package will revert pyyaml back to 6 for its requirement
# and this is fine since sagemaker is more important than the models and
# the models still work on pyyaml 6 in this context.
# Need to install wheel before we can fix the pyyaml issue below
RUN pip install --no-cache-dir -U \
wheel \
"cython<3" \
"pyyaml<6" \
--no-build-isolation

# https://github.com/tensorflow/models/issues/9267
# tf-models does not respect existing installations of TF and always installs open source TF
RUN ${PIP} install \
--default-timeout=300 \
--retries 5 \
--no-cache-dir -U \
"tf-models-official==${TF_VERSION}.1" \
"tensorflow-text==${TF_VERSION}.0" \
&& ${PIP} uninstall -y tensorflow tensorflow-gpu \
&& ${PIP} install --no-cache-dir -U \
${TF_URL} \
"tensorflow-io==0.37.*" \
tensorflow-datasets

# Install rust and cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN $PYTHON -m pip install --no-cache-dir -U \
numba \
bokeh \
imageio \
opencv-python \
plotly \
seaborn \
shap

RUN $PYTHON -m pip install --no-cache-dir -U \
sagemaker \
sagemaker-experiments \
sagemaker-tensorflow-training \
sagemaker-training \
y-py \
sagemaker-studio-analytics-extension \
"sparkmagic<1" \
sagemaker-studio-sparkmagic-lib \
smclarify

# Remove python kernel installed by sparkmagic
RUN /usr/local/bin/jupyter-kernelspec remove -f python3

# remove tmp files
RUN rm -rf /tmp/*

RUN HOME_DIR=/root \
&& curl -o ${HOME_DIR}/oss_compliance.zip https://aws-dlinfra-utilities.s3.amazonaws.com/oss_compliance.zip \
&& unzip ${HOME_DIR}/oss_compliance.zip -d ${HOME_DIR}/ \
&& cp ${HOME_DIR}/oss_compliance/test/testOSSCompliance /usr/local/bin/testOSSCompliance \
&& chmod +x /usr/local/bin/testOSSCompliance \
&& chmod +x ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh \
&& ${HOME_DIR}/oss_compliance/generate_oss_compliance.sh ${HOME_DIR} ${PYTHON} \
&& rm -rf ${HOME_DIR}/oss_compliance*

ENTRYPOINT ["bash", "-m", "/usr/local/bin/dockerd_entrypoint.sh"]

CMD ["/bin/bash"]
Loading