-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathDockerfile.cpu
23 lines (14 loc) · 968 Bytes
/
Dockerfile.cpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM chainer-base:4.1.0-cpu-py3
LABEL com.amazonaws.sagemaker.capabilities.accept-bind-to-port=true
RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
RUN pip3 install --no-cache chainer==4.1.0 chainermn==1.3.0 chainercv==0.10.0 \
matplotlib==2.2.0 opencv-python==3.4.0.12 retrying==1.3.3
# Edit matplotlibrc to use "Agg" backend by default to write plots to PNG files (which some Chainer extensions do).
# https://matplotlib.org/tutorials/introductory/usage.html#what-is-a-backend
WORKDIR /usr/local/lib/python3.5/dist-packages/
RUN sed -i s/TkAgg/Agg/ matplotlib/mpl-data/matplotlibrc
WORKDIR /
COPY dist/sagemaker_chainer_container-1.0-py2.py3-none-any.whl /sagemaker_chainer_container-1.0-py2.py3-none-any.whl
RUN pip3 install --no-cache /sagemaker_chainer_container-1.0-py2.py3-none-any.whl
ENV SAGEMAKER_TRAINING_MODULE sagemaker_chainer_container.training:main
ENV SAGEMAKER_SERVING_MODULE sagemaker_chainer_container.serving:main