Skip to content

Commit b986bdf

Browse files
authored
Merge branch 'master' into fix-tf-2
2 parents 0c454fd + 9c0a7f3 commit b986bdf

32 files changed

+1028
-88
lines changed

README.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ The Docker images are built from the Dockerfiles specified in
5656
The Docker files are grouped based on TensorFlow version and separated
5757
based on Python version and processor type.
5858

59+
The Docker files for TensorFlow 2.0 are available in the
60+
`tf-2 <https://github.com/aws/sagemaker-tensorflow-container/tree/tf-2>`__ branch, in
61+
`docker/2.0.0/ <https://github.com/aws/sagemaker-tensorflow-container/tree/tf-2/docker/2.0.0>`__.
62+
5963
The Docker images, used to run training & inference jobs, are built from
6064
both corresponding "base" and "final" Dockerfiles.
6165

@@ -203,7 +207,7 @@ Running integration tests require `Docker <https://www.docker.com/>`__ and `AWS
203207
credentials <https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html>`__,
204208
as the integration tests make calls to a couple AWS services. The integration and functional
205209
tests require configurations specified within their respective
206-
`conftest.py <https://github.com/aws/sagemaker-tensorflow-containers/blob/master/test/integ/conftest.py>`__.
210+
`conftest.py <https://github.com/aws/sagemaker-tensorflow-containers/blob/master/test/integration/conftest.py>`__.Make sure to update the account-id and region at a minimum.
207211

208212
Integration tests on GPU require `Nvidia-Docker <https://github.com/NVIDIA/nvidia-docker>`__.
209213

@@ -218,18 +222,18 @@ If you want to run local integration tests, then use:
218222

219223
# Required arguments for integration tests are found in test/integ/conftest.py
220224

221-
pytest test/integ --docker-base-name <your_docker_image> \
222-
--tag <your_docker_image_tag> \
223-
--framework-version <tensorflow_version> \
224-
--processor <cpu_or_gpu>
225+
pytest test/integration --docker-base-name <your_docker_image> \
226+
--tag <your_docker_image_tag> \
227+
--framework-version <tensorflow_version> \
228+
--processor <cpu_or_gpu>
225229

226230
::
227231

228232
# Example
229-
pytest test/integ --docker-base-name preprod-tensorflow \
230-
--tag 1.0 \
231-
--framework-version 1.4.1 \
232-
--processor cpu
233+
pytest test/integration --docker-base-name preprod-tensorflow \
234+
--tag 1.0 \
235+
--framework-version 1.4.1 \
236+
--processor cpu
233237

234238
Functional Tests
235239
~~~~~~~~~~~~~~~~

buildspec-release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 0.2
22

33
env:
44
variables:
5-
FRAMEWORK_VERSION: '1.13.1'
5+
FRAMEWORK_VERSION: '1.15.0'
66
GPU_INSTANCE_TYPE: 'ml.p2.xlarge'
77
SETUP_FILE: 'setup_cmds.sh'
88
SETUP_CMDS: '#!/bin/bash\npip install --upgrade pip\npip install -U -e .\npip install -U -e .[test]'
@@ -60,21 +60,21 @@ phases:
6060
echo '[{
6161
"repository": "sagemaker-tensorflow-scriptmode",
6262
"tags": [{
63-
"source": "1.13.1-cpu-py2",
64-
"dest": ["1.13.1-cpu-py2", "1.13-cpu-py2", "1.13.1-cpu-py2-'${CODEBUILD_BUILD_ID#*:}'"]
63+
"source": "1.15.0-cpu-py2",
64+
"dest": ["1.15.0-cpu-py2", "1.15-cpu-py2", "1.15.0-cpu-py2-'${CODEBUILD_BUILD_ID#*:}'"]
6565
},{
66-
"source": "1.13.1-cpu-py3",
67-
"dest": ["1.13.1-cpu-py3", "1.13-cpu-py3", "1.13.1-cpu-py3-'${CODEBUILD_BUILD_ID#*:}'"]
66+
"source": "1.15.0-cpu-py3",
67+
"dest": ["1.15.0-cpu-py3", "1.15-cpu-py3", "1.15.0-cpu-py3-'${CODEBUILD_BUILD_ID#*:}'"]
6868
},{
69-
"source": "1.13.1-gpu-py2",
70-
"dest": ["1.13.1-gpu-py2", "1.13-gpu-py2", "1.13.1-gpu-py2-'${CODEBUILD_BUILD_ID#*:}'"]
69+
"source": "1.15.0-gpu-py2",
70+
"dest": ["1.15.0-gpu-py2", "1.15-gpu-py2", "1.15.0-gpu-py2-'${CODEBUILD_BUILD_ID#*:}'"]
7171
},{
72-
"source": "1.13.1-gpu-py3",
73-
"dest": ["1.13.1-gpu-py3", "1.13-gpu-py3", "1.13.1-gpu-py3-'${CODEBUILD_BUILD_ID#*:}'"]
72+
"source": "1.15.0-gpu-py3",
73+
"dest": ["1.15.0-gpu-py3", "1.15-gpu-py3", "1.15.0-gpu-py3-'${CODEBUILD_BUILD_ID#*:}'"]
7474
}],
7575
"test": [
76-
"IGNORE_COVERAGE=- tox -e py36 -- -m deploy_test test/integration/sagemaker -n 4 --region {region} --account-id {aws-id} --instance-type {cpu-instance-type} --docker-base-name sagemaker-tensorflow-scriptmode --framework-version 1.13.1 --processor cpu --py-version 2,3",
77-
"IGNORE_COVERAGE=- tox -e py36 -- -m deploy_test test/integration/sagemaker -n 4 --region {region} --account-id {aws-id} --docker-base-name sagemaker-tensorflow-scriptmode --framework-version 1.13.1 --processor gpu --py-version 2,3"
76+
"IGNORE_COVERAGE=- tox -e py36 -- -m deploy_test test/integration/sagemaker -n 4 --region {region} --account-id {aws-id} --instance-type {cpu-instance-type} --docker-base-name sagemaker-tensorflow-scriptmode --framework-version 1.15.0 --processor cpu --py-version 2,3",
77+
"IGNORE_COVERAGE=- tox -e py36 -- -m deploy_test test/integration/sagemaker -n 4 --region {region} --account-id {aws-id} --docker-base-name sagemaker-tensorflow-scriptmode --framework-version 1.15.0 --processor gpu --py-version 2,3"
7878
]
7979
}]' > deployments.json
8080

buildspec.yml

Lines changed: 59 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ version: 0.2
22

33
env:
44
variables:
5-
FRAMEWORK_VERSION: '1.13.1'
6-
CPU_FRAMEWORK_BINARY: 'https://s3-us-west-2.amazonaws.com/tensorflow-aws/1.13/AmazonLinux/cpu/latest-patch-latest-patch/tensorflow-1.13.1-cp36-cp36m-linux_x86_64.whl'
7-
CPU_PY_VERSION: '3'
8-
GPU_FRAMEWORK_BINARY: 'https://s3-us-west-2.amazonaws.com/tensorflow-aws/1.13/AmazonLinux/gpu/latest-patch-latest-patch/tensorflow-1.13.1-cp36-cp36m-linux_x86_64.whl'
9-
GPU_PY_VERSION: '3'
5+
FRAMEWORK_VERSION: '1.15.0'
106
ECR_REPO: 'sagemaker-test'
117
GITHUB_REPO: 'sagemaker-tensorflow-container'
128
SETUP_FILE: 'setup_cmds.sh'
@@ -34,80 +30,95 @@ phases:
3430
- tox -e py36,py27 test/unit
3531

3632
# Create pip archive
37-
- build_dir="docker/$FRAMEWORK_VERSION"
33+
- root_dir=$(pwd)
3834
- build_id="$(echo $CODEBUILD_BUILD_ID | sed -e 's/:/-/g')"
3935
- python3 setup.py sdist
4036
- tar_name=$(ls dist)
41-
- cp dist/$tar_name $build_dir
4237

43-
# build cpu image
44-
- cpu_dockerfile="Dockerfile.cpu"
38+
# Find build artifacts
39+
- build_artifacts=$root_dir/docker/artifacts
4540

46-
# Download framework binary
47-
- cpu_fw_binary=$(basename $CPU_FRAMEWORK_BINARY)
48-
- wget -O $build_dir/$cpu_fw_binary $CPU_FRAMEWORK_BINARY
49-
50-
- CPU_TAG="$FRAMEWORK_VERSION-cpu-py$CPU_PY_VERSION-$build_id"
41+
# build py2 images
5142

43+
# prepare build context
44+
- build_dir="$root_dir/docker/$FRAMEWORK_VERSION/py2"
45+
- cp $root_dir/dist/$tar_name $build_dir
46+
- cp $build_artifacts/* $build_dir/
5247
- cd $build_dir
53-
- docker build -f $cpu_dockerfile --build-arg framework_support_installable=$tar_name --build-arg py_version=$CPU_PY_VERSION --build-arg framework_installable=$cpu_fw_binary -t $PREPROD_IMAGE:$CPU_TAG .
54-
- cd ../../
48+
49+
# build cpu image
50+
- cpu_dockerfile="Dockerfile.cpu"
51+
- CPU_TAG_PY2="$FRAMEWORK_VERSION-cpu-py2-$build_id"
52+
- docker build -f $cpu_dockerfile -t $PREPROD_IMAGE:$CPU_TAG_PY2 .
5553

5654
# build gpu image
5755
- gpu_dockerfile="Dockerfile.gpu"
56+
- GPU_TAG_PY2="$FRAMEWORK_VERSION-gpu-py2-$build_id"
57+
- docker build -f $gpu_dockerfile -t $PREPROD_IMAGE:$GPU_TAG_PY2 .
5858

59-
# Download framework binary
60-
- gpu_fw_binary=$(basename $GPU_FRAMEWORK_BINARY)
61-
- wget -O $build_dir/$gpu_fw_binary $GPU_FRAMEWORK_BINARY
62-
63-
- GPU_TAG="$FRAMEWORK_VERSION-gpu-py$GPU_PY_VERSION-$build_id"
59+
# build py3 images
6460

61+
# prepare build context
62+
- build_dir="$root_dir/docker/$FRAMEWORK_VERSION/py3"
63+
- cp $root_dir/dist/$tar_name $build_dir
64+
- cp $build_artifacts/* $build_dir/
6565
- cd $build_dir
66-
- docker build -f $gpu_dockerfile --build-arg framework_support_installable=$tar_name --build-arg py_version=$GPU_PY_VERSION --build-arg framework_installable=$gpu_fw_binary -t $PREPROD_IMAGE:$GPU_TAG .
67-
- cd ../../
66+
67+
# build cpu image
68+
- cpu_dockerfile="Dockerfile.cpu"
69+
- CPU_TAG_PY3="$FRAMEWORK_VERSION-cpu-py3-$build_id"
70+
- docker build -f $cpu_dockerfile -t $PREPROD_IMAGE:$CPU_TAG_PY3 .
71+
72+
# build gpu image
73+
- gpu_dockerfile="Dockerfile.gpu"
74+
- GPU_TAG_PY3="$FRAMEWORK_VERSION-gpu-py3-$build_id"
75+
- docker build -f $gpu_dockerfile -t $PREPROD_IMAGE:$GPU_TAG_PY3 .
6876

6977
# push images to ecr
7078
- $(aws ecr get-login --registry-ids $ACCOUNT --no-include-email --region $AWS_DEFAULT_REGION)
71-
- docker push $PREPROD_IMAGE:$CPU_TAG
72-
- docker push $PREPROD_IMAGE:$GPU_TAG
79+
- docker push $PREPROD_IMAGE:$CPU_TAG_PY2
80+
- docker push $PREPROD_IMAGE:$GPU_TAG_PY2
81+
- docker push $PREPROD_IMAGE:$CPU_TAG_PY3
82+
- docker push $PREPROD_IMAGE:$GPU_TAG_PY3
7383

7484
# launch remote gpu instance
7585
- instance_type='p2.xlarge'
7686
- create-key-pair
7787
- launch-ec2-instance --instance-type $instance_type --ami-name dlami-ubuntu
7888

7989
# run cpu integration tests
80-
- |
81-
if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml"; then
82-
pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG --framework-version $FRAMEWORK_VERSION --py-version $CPU_PY_VERSION --processor cpu
83-
else
84-
echo "skipping cpu integration tests"
85-
fi
90+
- py3_cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY2 --framework-version $FRAMEWORK_VERSION --py-version 2 --processor cpu"
91+
- py2_cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY3 --framework-version $FRAMEWORK_VERSION --py-version 3 --processor cpu"
92+
- execute-command-if-has-matching-changes "$py3_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
93+
- execute-command-if-has-matching-changes "$py2_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
8694

8795
# run gpu integration tests
88-
- |
89-
if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml"; then
90-
printf "$SETUP_CMDS" > $SETUP_FILE
91-
cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $GPU_TAG --framework-version $FRAMEWORK_VERSION --py-version $GPU_PY_VERSION --processor gpu"
92-
remote-test --github-repo $GITHUB_REPO --test-cmd "$cmd" --setup-file $SETUP_FILE --pr-number "$PR_NUM"
93-
else
94-
echo "skipping gpu integration tests"
95-
fi
96+
- printf "$SETUP_CMDS" > $SETUP_FILE
97+
- cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $GPU_TAG_PY2 --framework-version $FRAMEWORK_VERSION --py-version 2 --processor gpu"
98+
- py3_cmd="remote-test --github-repo $GITHUB_REPO --test-cmd \"$cmd\" --setup-file $SETUP_FILE --pr-number \"$PR_NUM\""
99+
- execute-command-if-has-matching-changes "$py3_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
100+
101+
- cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $GPU_TAG_PY3 --framework-version $FRAMEWORK_VERSION --py-version 3 --processor gpu"
102+
- py2_cmd="remote-test --github-repo $GITHUB_REPO --test-cmd \"$cmd\" --setup-file $SETUP_FILE --pr-number \"$PR_NUM\""
103+
- execute-command-if-has-matching-changes "$py2_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
96104

97105
# run sagemaker tests
98-
- |
99-
if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml"; then
100-
pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG --py-version $CPU_PY_VERSION --processor cpu
101-
pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG --py-version $GPU_PY_VERSION --processor gpu
102-
else
103-
echo "skipping sagemaker tests"
104-
fi
106+
- test_cmd="pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY2 --py-version 2 --processor cpu"
107+
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
108+
- test_cmd="pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG_PY2 --py-version 2 --processor gpu"
109+
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
110+
- test_cmd="pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY3 --py-version 3 --processor cpu"
111+
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
112+
- test_cmd="pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG_PY3 --py-version 3 --processor gpu"
113+
- execute-command-if-has-matching-changes "$test_cmd" "test/" "src/*.py" "setup.py" "docker/*" "buildspec.yml"
105114

106115
finally:
107116
# shut down remote gpu instance
108117
- cleanup-gpu-instances
109118
- cleanup-key-pairs
110119

111120
# remove ecr image
112-
- aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$CPU_TAG
113-
- aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$GPU_TAG
121+
- aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$CPU_TAG_PY2
122+
- aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$GPU_TAG_PY2
123+
- aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$CPU_TAG_PY3
124+
- aws ecr batch-delete-image --repository-name $ECR_REPO --region $AWS_DEFAULT_REGION --image-ids imageTag=$GPU_TAG_PY3

docker/1.15.0/py2/Dockerfile.cpu

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
FROM ubuntu:18.04
2+
3+
LABEL maintainer="Amazon AI"
4+
5+
# Prevent docker build get stopped by requesting user interaction
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
ENV DEBCONF_NONINTERACTIVE_SEEN=true
8+
# Set environment variables for MKL
9+
# https://www.tensorflow.org/performance/performance_guide#tensorflow_with_intel%C2%AE_mkl_dnn
10+
ENV KMP_AFFINITY=granularity=fine,compact,1,0
11+
ENV KMP_BLOCKTIME=1
12+
ENV KMP_SETTINGS=0
13+
# Python won’t try to write .pyc or .pyo files on the import of source modules
14+
ENV PYTHONDONTWRITEBYTECODE=1
15+
ENV PYTHONUNBUFFERED=1
16+
# See http://bugs.python.org/issue19846
17+
ENV PYTHONIOENCODING=UTF-8
18+
ENV LANG=C.UTF-8
19+
ENV LC_ALL=C.UTF-8
20+
# Specify the location of module that contains the training logic for SageMaker
21+
# https://docs.aws.amazon.com/sagemaker/latest/dg/docker-container-environmental-variables-entrypoint.html
22+
ENV SAGEMAKER_TRAINING_MODULE=sagemaker_tensorflow_container.training:main
23+
24+
# Define framework-related package sources
25+
ARG FRAMEWORK_SUPPORT_INSTALLABLE=sagemaker_tensorflow_container*.tar.gz
26+
ARG TF_URL=https://tensorflow-aws.s3-us-west-2.amazonaws.com/1.15/AmazonLinux/cpu/final/tensorflow-1.15.0-cp27-cp27mu-manylinux2010_x86_64.whl
27+
28+
RUN apt-get update \
29+
&& apt-get install -y --no-install-recommends \
30+
software-properties-common \
31+
build-essential \
32+
openssh-client \
33+
openssh-server \
34+
ca-certificates \
35+
curl \
36+
git \
37+
wget \
38+
vim \
39+
zlib1g-dev \
40+
&& rm -rf /var/lib/apt/lists/*
41+
42+
# Install Open MPI
43+
RUN mkdir /tmp/openmpi \
44+
&& cd /tmp/openmpi \
45+
&& curl -fSsL -O https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.1.tar.gz \
46+
&& tar zxf openmpi-4.0.1.tar.gz \
47+
&& cd openmpi-4.0.1 \
48+
&& ./configure --enable-orterun-prefix-by-default \
49+
&& make -j $(nproc) all \
50+
&& make install \
51+
&& ldconfig \
52+
&& rm -rf /tmp/openmpi
53+
54+
# Create a wrapper for OpenMPI to allow running as root by default
55+
RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real \
56+
&& echo '#!/bin/bash' > /usr/local/bin/mpirun \
57+
&& echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun \
58+
&& chmod a+x /usr/local/bin/mpirun
59+
60+
RUN echo "hwloc_base_binding_policy = none" >> /usr/local/etc/openmpi-mca-params.conf \
61+
&& echo "rmaps_base_mapping_policy = slot" >> /usr/local/etc/openmpi-mca-params.conf
62+
63+
ENV LD_LIBRARY_PATH=/usr/local/openmpi/lib:$LD_LIBRARY_PATH
64+
ENV PATH=/usr/local/openmpi/bin/:$PATH
65+
66+
# SSH login fix. Otherwise user is kicked off after login
67+
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
68+
69+
# Create SSH key.
70+
RUN mkdir -p /root/.ssh/ \
71+
&& mkdir -p /var/run/sshd \
72+
&& ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa \
73+
&& cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys \
74+
&& printf "Host *\n StrictHostKeyChecking no\n" >> /root/.ssh/config
75+
76+
WORKDIR /
77+
78+
RUN apt-get update \
79+
&& apt-get install -y \
80+
python \
81+
python-pip
82+
83+
COPY $FRAMEWORK_SUPPORT_INSTALLABLE .
84+
85+
RUN pip --no-cache-dir install --upgrade \
86+
pip \
87+
setuptools
88+
89+
# Some TF tools expect a "python" binary
90+
RUN ln -s $(which python) /usr/local/bin/python
91+
92+
RUN pip install --no-cache-dir -U \
93+
numpy==1.16.5 \
94+
scipy==1.2.2 \
95+
scikit-learn==0.20.3 \
96+
pandas==0.24.2 \
97+
Pillow==6.2.1 \
98+
h5py==2.9.0 \
99+
keras_applications==1.0.8 \
100+
keras_preprocessing==1.1.0 \
101+
requests==2.22.0 \
102+
keras==2.3.1 \
103+
mpi4py==3.0.2 \
104+
"cryptography>=2.3" \
105+
"sagemaker-tensorflow>=1.15,<1.16" \
106+
# Let's install TensorFlow separately in the end to avoid the library version to be overwritten
107+
&& pip install --force-reinstall --no-cache-dir -U \
108+
${TF_URL} \
109+
&& pip install --no-cache-dir -U \
110+
$FRAMEWORK_SUPPORT_INSTALLABLE \
111+
awscli==1.17.7 \
112+
&& rm -f $FRAMEWORK_SUPPORT_INSTALLABLE \
113+
&& pip install --no-cache-dir -U \
114+
horovod==0.18.2
115+
116+
COPY dockerd-entrypoint.py /usr/local/bin/dockerd-entrypoint.py
117+
COPY deep_learning_container.py /usr/local/bin/deep_learning_container.py
118+
119+
RUN chmod +x /usr/local/bin/dockerd-entrypoint.py \
120+
&& chmod +x /usr/local/bin/deep_learning_container.py
121+
122+
RUN curl https://aws-dlc-licenses.s3.amazonaws.com/tensorflow/license.txt -o /license.txt
123+
124+
ENTRYPOINT ["python", "/usr/local/bin/dockerd-entrypoint.py"]
125+
CMD ["bin/bash"]

0 commit comments

Comments
 (0)