Skip to content

Commit 5f5c0cd

Browse files
sboshinchuyang-deng
authored andcommitted
Tf 2 public (#261)
* Moving to public S3 * fixing cpu py3 * Add License files * Removing tmp files after install
1 parent fa39d77 commit 5f5c0cd

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

docker/2.0.0/py2/Dockerfile.cpu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ ENV LC_ALL=C.UTF-8
2222

2323
ARG FRAMEWORK_SUPPORT_INSTALLABLE=sagemaker_tensorflow_container-2.0.8.dev0.tar.gz
2424
ARG TENSORFLOW_WHL=tensorflow-2.0.0-cp27-cp27mu-manylinux2010_x86_64.whl
25+
ARG TF_URL=https://tensorflow-aws.s3-us-west-2.amazonaws.com/2.0/AmazonLinux/cpu/final/$TENSORFLOW_WHL
2526

2627
ARG PYTHON=python
2728
ARG PYTHON_PIP=python-pip
@@ -81,7 +82,6 @@ RUN apt-get update && apt-get install -y \
8182
${PYTHON_PIP}
8283

8384
COPY $FRAMEWORK_SUPPORT_INSTALLABLE .
84-
COPY $TENSORFLOW_WHL .
8585

8686
RUN ${PIP} --no-cache-dir install --upgrade \
8787
pip \
@@ -90,6 +90,9 @@ RUN ${PIP} --no-cache-dir install --upgrade \
9090
# Some TF tools expect a "python" binary
9191
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python
9292

93+
# Setup TF Wheel
94+
RUN wget $TF_URL -O /tmp/$TENSORFLOW_WHL
95+
9396
# install PyYAML==5.1.2 to avoid conflict with latest awscli
9497
# # python-dateutil==2.8.0 to satisfy botocore associated with latest awscli
9598
RUN ${PIP} install --no-cache-dir -U \
@@ -113,7 +116,8 @@ RUN ${PIP} install --no-cache-dir -U \
113116
# the library version to be overwritten
114117
# ${PIP} install --no-cache-dir -U ${TF_URL} \
115118
&& ${PIP} install --no-cache-dir -U \
116-
$TENSORFLOW_WHL \
119+
/tmp/$TENSORFLOW_WHL \
120+
&& rm -f /tmp/$TENSORFLOW_WHL \
117121
&& ${PIP} install --no-cache-dir -U \
118122
$FRAMEWORK_SUPPORT_INSTALLABLE \
119123
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE \
@@ -126,5 +130,7 @@ COPY deep_learning_container.py /usr/local/bin/deep_learning_container.py
126130
RUN chmod +x /usr/local/bin/dockerd-entrypoint.py \
127131
&& chmod +x /usr/local/bin/deep_learning_container.py
128132

133+
RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow-2.0/license.txt -o /license.txt
134+
129135
ENTRYPOINT ["python", "/usr/local/bin/dockerd-entrypoint.py"]
130136
CMD ["bin/bash"]

docker/2.0.0/py2/Dockerfile.gpu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ENV LC_ALL=C.UTF-8
1515

1616
ARG FRAMEWORK_SUPPORT_INSTALLABLE=sagemaker_tensorflow_container-2.0.8.dev0.tar.gz
1717
ARG TENSORFLOW_WHL=tensorflow_gpu-2.0.0-cp27-cp27mu-manylinux2010_x86_64.whl
18+
ARG TF_URL=https://tensorflow-aws.s3-us-west-2.amazonaws.com/2.0/AmazonLinux/gpu/final/$TENSORFLOW_WHL
1819

1920
ARG PYTHON=python
2021
ARG PYTHON_PIP=python-pip
@@ -116,7 +117,9 @@ RUN ${PIP} --no-cache-dir install --upgrade \
116117
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python
117118

118119
COPY $FRAMEWORK_SUPPORT_INSTALLABLE .
119-
COPY $TENSORFLOW_WHL .
120+
121+
# Setup TF Wheel
122+
RUN wget $TF_URL -O /tmp/$TENSORFLOW_WHL
120123

121124
# install PyYAML==5.1.2 to avoid conflict with latest awscli
122125
# # python-dateutil==2.8.0 to satisfy botocore associated with latest awscli
@@ -141,7 +144,8 @@ RUN ${PIP} install --no-cache-dir -U \
141144
# the library version to be overwritten
142145
# ${PIP} install --no-cache-dir -U ${TF_URL} \
143146
&& ${PIP} install --no-cache-dir -U \
144-
$TENSORFLOW_WHL \
147+
/tmp/$TENSORFLOW_WHL \
148+
&& rm -f /tmp/$TENSORFLOW_WHL \
145149
&& ${PIP} install --no-cache-dir -U \
146150
$FRAMEWORK_SUPPORT_INSTALLABLE \
147151
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
@@ -162,5 +166,7 @@ COPY deep_learning_container.py /usr/local/bin/deep_learning_container.py
162166
RUN chmod +x /usr/local/bin/dockerd-entrypoint.py \
163167
&& chmod +x /usr/local/bin/deep_learning_container.py
164168

169+
RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow-2.0/license.txt -o /license.txt
170+
165171
ENTRYPOINT ["python", "/usr/local/bin/dockerd-entrypoint.py"]
166172
CMD ["bin/bash"]

docker/2.0.0/py3/Dockerfile.cpu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ARG PIP=pip3
2929

3030
ARG FRAMEWORK_SUPPORT_INSTALLABLE=sagemaker_tensorflow_container-2.0.8.dev0.tar.gz
3131
ARG TENSORFLOW_WHL=tensorflow-2.0.0-cp36-cp36m-manylinux2010_x86_64.whl
32+
ARG TF_URL=https://tensorflow-aws.s3-us-west-2.amazonaws.com/2.0/AmazonLinux/cpu/final/$TENSORFLOW_WHL
3233

3334
RUN apt-get update && apt-get install -y --no-install-recommends \
3435
python3-dev \
@@ -83,7 +84,6 @@ RUN mkdir -p /root/.ssh/ \
8384
WORKDIR /
8485

8586
COPY $FRAMEWORK_SUPPORT_INSTALLABLE .
86-
COPY $TENSORFLOW_WHL .
8787

8888
RUN ${PIP} --no-cache-dir install --upgrade \
8989
pip \
@@ -93,6 +93,9 @@ RUN ${PIP} --no-cache-dir install --upgrade \
9393
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
9494
&& ln -s $(which ${PIP}) /usr/bin/pip
9595

96+
# Setup TF Wheel
97+
RUN wget $TF_URL -O /tmp/$TENSORFLOW_WHL
98+
9699
# install PyYAML==5.1.2 to avoid conflict with latest awscli
97100
# # python-dateutil==2.8.0 to satisfy botocore associated with latest awscli
98101
RUN ${PIP} install --no-cache-dir -U \
@@ -115,8 +118,9 @@ RUN ${PIP} install --no-cache-dir -U \
115118
# the library version to be overwritten
116119
# ${PIP} install --no-cache-dir -U ${TF_URL} \
117120
&& ${PIP} install --no-cache-dir -U \
118-
$TENSORFLOW_WHL \
121+
/tmp/$TENSORFLOW_WHL \
119122
horovod==0.18.2 \
123+
&& rm -f /tmp/$TENSORFLOW_WHL \
120124
&& ${PIP} install --no-cache-dir -U \
121125
$FRAMEWORK_SUPPORT_INSTALLABLE \
122126
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
@@ -127,5 +131,7 @@ COPY deep_learning_container.py /usr/local/bin/deep_learning_container.py
127131
RUN chmod +x /usr/local/bin/dockerd-entrypoint.py \
128132
&& chmod +x /usr/local/bin/deep_learning_container.py
129133

134+
RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow-2.0/license.txt -o /license.txt
135+
130136
ENTRYPOINT ["python", "/usr/local/bin/dockerd-entrypoint.py"]
131137
CMD ["bin/bash"]

docker/2.0.0/py3/Dockerfile.gpu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ARG PIP=pip3
2929

3030
ARG FRAMEWORK_SUPPORT_INSTALLABLE=sagemaker_tensorflow_container-2.0.8.dev0.tar.gz
3131
ARG TENSORFLOW_WHL=tensorflow_gpu-2.0.0-cp36-cp36m-manylinux2010_x86_64.whl
32+
ARG TF_URL=https://tensorflow-aws.s3-us-west-2.amazonaws.com/2.0/AmazonLinux/gpu/final/$TENSORFLOW_WHL
3233

3334
RUN apt-get update && apt-get install -y --no-install-recommends --allow-unauthenticated \
3435
python3-dev \
@@ -130,7 +131,9 @@ RUN ln -s $(which ${PYTHON}) /usr/local/bin/python \
130131
&& ln -s $(which ${PIP}) /usr/bin/pip
131132

132133
COPY $FRAMEWORK_SUPPORT_INSTALLABLE .
133-
COPY $TENSORFLOW_WHL .
134+
135+
# Setup TF Wheel
136+
RUN wget $TF_URL -O /tmp/$TENSORFLOW_WHL
134137

135138
# install PyYAML==5.1.2 to avoid conflict with latest awscli
136139
# # python-dateutil==2.8.0 to satisfy botocore associated with latest awscli
@@ -154,7 +157,8 @@ RUN ${PIP} install --no-cache-dir -U \
154157
# the library version to be overwritten
155158
# ${PIP} install --no-cache-dir -U ${TF_URL} \
156159
&& ${PIP} install --no-cache-dir -U \
157-
$TENSORFLOW_WHL \
160+
/tmp/$TENSORFLOW_WHL \
161+
&& rm -f /tmp/$TENSORFLOW_WHL \
158162
&& ${PIP} install --no-cache-dir -U \
159163
$FRAMEWORK_SUPPORT_INSTALLABLE \
160164
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE
@@ -175,5 +179,7 @@ COPY deep_learning_container.py /usr/local/bin/deep_learning_container.py
175179
RUN chmod +x /usr/local/bin/dockerd-entrypoint.py \
176180
&& chmod +x /usr/local/bin/deep_learning_container.py
177181

182+
RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow-2.0/license.txt -o /license.txt
183+
178184
ENTRYPOINT ["python", "/usr/local/bin/dockerd-entrypoint.py"]
179185
CMD ["bin/bash"]

0 commit comments

Comments
 (0)