forked from divyamrast/Learning-via-Difference-Models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.cpu_gui
165 lines (144 loc) · 5.08 KB
/
Dockerfile.cpu_gui
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
FROM ubuntu:16.04
LABEL maintainer="Ivan Koryakovskiy <[email protected]>"
COPY keyboard /etc/default
# use tud mirrors for ubuntu
RUN sed -i 's|archive.ubuntu.com/ubuntu/|ftp.tudelft.nl/archive.ubuntu.com/|g' /etc/apt/sources.list
# Pick up dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
curl \
nano \
wget \
unzip \
xpra \
swig \
g++ \
cmake \
git \
rsync \
software-properties-common \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
libpq-dev \
libjpeg-dev \
libboost-all-dev \
libsdl2-dev \
libav-tools \
libeigen3-dev \
libgl1-mesa-dev \
freeglut3-dev \
libz-dev \
libqt4-opengl-dev \
libtinyxml-dev \
libmuparser-dev \
libode-dev \
liblua5.1-dev \
libprotoc-dev \
protobuf-compiler \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
ffmpeg \
qtbase5-dev \
libqt5opengl5-dev \
libassimp-dev \
libpython3.5-dev \
libboost-python-dev \
libtinyxml-dev \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
#============================
# Graphical interface
#============================
# Display configuration options
ENV SCREEN_WIDTH 1920
ENV SCREEN_HEIGHT 1080
ENV SCREEN_DEPTH 24
ENV DISPLAY :0
# VNC, locale, fonts, fluxbox (a fast, lightweight and responsive window manager)
RUN apt-get update -qqy \
&& apt-get -qqy install \
x11vnc xvfb dbus \
locales language-pack-en \
fonts-ipafont-gothic xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable \
fluxbox \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p ~/.vnc
# Fixing Warning: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open “/var/lib/dbus/machine-id”
# http://www.torkwrench.com/2011/12/16/d-bus-library-appears-to-be-incorrectly-set-up-failed-to-read-machine-uuid-failed-to-open-varlibdbusmachine-id/
RUN dbus-uuidgen > /etc/machine-id
# Fixing errors like: "Failed to read: session.screen0.tab.width"
# https://sourceforge.net/p/fluxbox/mailman/fluxbox-users/thread/[email protected]/
RUN cp -R /etc/X11/fluxbox ~/.fluxbox
RUN cp -R /etc/X11/fluxbox /home/.fluxbox
# Locale settings
ENV LANGUAGE en_US.UTF-8
ENV LANG en_US.UTF-8
RUN locale-gen en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
#============================
# Graphical interface (END)
#============================
#============================
# Tensorflow and OpenAI
#============================
RUN wget https://github.com/lakshayg/tensorflow-build/raw/master/tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl
RUN pip3 install --ignore-installed --upgrade tensorflow-1.4.0-cp35-cp35m-linux_x86_64.whl
# Install OpenAI Gum
ADD https://api.github.com/repos/ikoryakovskiy/gym/git/refs/heads/master version.json
RUN git clone https://github.com/ikoryakovskiy/gym.git \
&& cd gym \
&& pip3 install -e .
RUN pip3 --no-cache-dir install \
scipy \
scikit-optimize \
tqdm \
joblib \
zmq \
dill \
azure \
progressbar2 \
mpi4py \
h5py \
tflearn \
pyyaml \
pyopengl \
cma
# Install OpenAI Baselines
ADD https://api.github.com/repos/ikoryakovskiy/baselines/git/refs/heads/master version.json
RUN git clone https://github.com/ikoryakovskiy/baselines.git \
&& cd baselines \
&& pip3 install -e .
# Install GRL wrapper
ADD https://api.github.com/repos/ikoryakovskiy/grlwrappers/git/refs/heads/master version.json
RUN git clone https://github.com/ikoryakovskiy/grlwrappers.git \
&& cd grlwrappers \
&& pip3 install -e .
# Install OpenAI Robotschool with Gym in the middle
ARG ROBOSCHOOL_PATH=/roboschool
ARG ROBOSCHOOL_REPO=https://github.com/ikoryakovskiy/roboschool.git
ARG BULLET_REPO=https://github.com/ikoryakovskiy/bullet3.git
ADD https://api.github.com/repos/ikoryakovskiy/bullet3/git/refs/heads/roboschool_self_collision version.json
RUN git clone $BULLET_REPO -b roboschool_self_collision \
&& mkdir bullet3/build \
&& cd bullet3/build \
&& cmake -DBUILD_SHARED_LIBS=ON -DUSE_DOUBLE_PRECISION=1 -DCMAKE_INSTALL_PREFIX:PATH=$ROBOSCHOOL_PATH/roboschool/cpp-household/bullet_local_install -DBUILD_CPU_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_EXTRAS=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_CLSOCKET=OFF -DBUILD_ENET=OFF -DBUILD_OPENGL3_DEMOS=OFF .. \
&& make -j4 \
&& make install
ADD https://api.github.com/repos/ikoryakovskiy/roboschool/git/refs/heads/master version.json
RUN cd $ROBOSCHOOL_PATH \
&& git init \
&& git remote add origin $ROBOSCHOOL_REPO \
&& git fetch \
&& git checkout -t origin/master
RUN pip3 install -e $ROBOSCHOOL_PATH
# Entrypoint scripts
COPY entrypoint_gui.sh /opt/bin/entrypoint.sh
RUN chmod +x /opt/bin/entrypoint.sh
EXPOSE 5900
ENTRYPOINT ["/opt/bin/entrypoint.sh"]
WORKDIR /drl