Skip to content

Commit 89674f1

Browse files
authored
change: install SageMaker Python SDK into Python 3 images (#296)
1 parent 5076641 commit 89674f1

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

docker/2.1.0/py3/Dockerfile.cpu

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ ENV SAGEMAKER_TRAINING_MODULE sagemaker_tensorflow_container.training:main
1010
# Set environment variables for MKL
1111
# For more about MKL with TensorFlow see:
1212
# https://www.tensorflow.org/performance/performance_guide#tensorflow_with_intel%C2%AE_mkl_dnn
13-
ENV KMP_AFFINITY=granularity=fine,compact,1,0
14-
ENV KMP_BLOCKTIME=1
13+
ENV KMP_AFFINITY=granularity=fine,compact,1,0
14+
ENV KMP_BLOCKTIME=1
1515
ENV KMP_SETTINGS=0
1616

17-
ENV PYTHONDONTWRITEBYTECODE=1
18-
ENV PYTHONUNBUFFERED=1
19-
ENV PYTHONIOENCODING=UTF-8
20-
ENV LANG=C.UTF-8
17+
ENV PYTHONDONTWRITEBYTECODE=1
18+
ENV PYTHONUNBUFFERED=1
19+
ENV PYTHONIOENCODING=UTF-8
20+
ENV LANG=C.UTF-8
2121
ENV LC_ALL=C.UTF-8
2222

2323
ARG PYTHON=python3
@@ -109,6 +109,7 @@ RUN ${PIP} install --no-cache-dir -U \
109109
awscli \
110110
mpi4py==3.0.3 \
111111
opencv-python==4.2.0.32 \
112+
sagemaker==1.50.17 \
112113
sagemaker-experiments==0.1.7 \
113114
"sagemaker-tensorflow>=2.1,<2.2" \
114115
# Let's install TensorFlow separately in the end to avoid
@@ -118,7 +119,7 @@ RUN ${PIP} install --no-cache-dir -U \
118119
horovod==0.18.2 \
119120
&& ${PIP} install --no-cache-dir -U \
120121
$FRAMEWORK_SUPPORT_INSTALLABLE \
121-
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
122+
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
122123

123124
RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow-2.1/license.txt -o /license.txt
124125

docker/2.1.0/py3/Dockerfile.gpu

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ ENV DEBIAN_FRONTEND noninteractive
77
ENV DEBCONF_NONINTERACTIVE_SEEN true
88
ENV SAGEMAKER_TRAINING_MODULE sagemaker_tensorflow_container.training:main
99

10-
ENV PYTHONDONTWRITEBYTECODE=1
11-
ENV PYTHONUNBUFFERED=1
12-
ENV PYTHONIOENCODING=UTF-8
13-
ENV LANG=C.UTF-8
10+
ENV PYTHONDONTWRITEBYTECODE=1
11+
ENV PYTHONUNBUFFERED=1
12+
ENV PYTHONIOENCODING=UTF-8
13+
ENV LANG=C.UTF-8
1414
ENV LC_ALL=C.UTF-8
1515

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

2323
ARG PYTHON=python3
@@ -153,6 +153,7 @@ RUN ${PIP} install --no-cache-dir -U \
153153
awscli \
154154
mpi4py==3.0.3 \
155155
opencv-python==4.2.0.32 \
156+
sagemaker==1.50.17 \
156157
sagemaker-experiments==0.1.7 \
157158
"sagemaker-tensorflow>=2.1,<2.2" \
158159
# Let's install TensorFlow separately in the end to avoid
@@ -161,7 +162,7 @@ RUN ${PIP} install --no-cache-dir -U \
161162
${TF_URL} \
162163
&& ${PIP} install --no-cache-dir -U \
163164
$FRAMEWORK_SUPPORT_INSTALLABLE \
164-
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
165+
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
165166

166167
# Install Horovod, temporarily using CUDA stubs
167168
RUN ldconfig /usr/local/cuda-10.1/targets/x86_64-linux/lib/stubs \

0 commit comments

Comments
 (0)