forked from aws/amazon-sagemaker-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (39 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
ARG CPU_OR_GPU
ARG AWS_REGION
FROM 462105765813.dkr.ecr.${AWS_REGION}.amazonaws.com/sagemaker-rl-ray-container:ray-1.6.0-tf-${CPU_OR_GPU}-py37
WORKDIR /opt/ml
# Roboschool dependencies
RUN apt-get update && apt-get install -y \
git cmake ffmpeg pkg-config \
qtbase5-dev libqt5opengl5-dev libassimp-dev \
libtinyxml-dev \
libgl1-mesa-dev \
&& cd /opt \
&& apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y libboost-python-dev
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3.7-dev \
&& ln -s -f /usr/bin/python3.7 /usr/bin/python \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
RUN curl -fSsL -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
RUN pip install --upgrade \
pip \
setuptools \
setproctitle \
lz4 \
psutil
RUN pip install sagemaker-tensorflow-training==20.1.4
RUN pip install roboschool==1.0.46
RUN pip install gym==0.15.4
ENV PYTHONUNBUFFERED 1
############################################
# Test Installation
############################################
# Test to verify if all required dependencies installed successfully or not.
RUN python -c "import gym;import sagemaker_containers.cli.train;import roboschool; import ray; from sagemaker_containers.cli.train import main"
# Make things a bit easier to debug
WORKDIR /opt/ml/code