-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.torcs
51 lines (45 loc) · 1.66 KB
/
Dockerfile.torcs
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
FROM consol/ubuntu-xfce-vnc
USER 0
ARG DISPLAY_WIDTH=64
ARG DISPLAY_HEIGHT=64
ENV SCREEN_WIDTH=640
ENV SCREEN_HEIGHT=480
ENV VNC_RESOLUTION=${SCREEN_WIDTH}x${SCREEN_HEIGHT}
ENV VNC_PW=tftorcs
RUN apt-get update -y -qq \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y -qq \
xautomation \
libglib2.0-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
freeglut3-dev \
libplib-dev \
libopenal-dev \
libalut-dev \
libxi-dev \
libxmu-dev \
libxrender-dev \
libxrandr-dev \
libpng12-dev \
curl \
git \
gdb
# https://github.com/ugo-nama-kun/gym_torcs/issues/7
RUN git clone https://github.com/ugo-nama-kun/gym_torcs.git gym_torcs \
&& cd gym_torcs/vtorcs-RL-color \
&& cp exp-settings/config/sound.xml src/modules/graphic/ssggraph/sound.xml \
&& sed -re s/attnum\ name="x"\ val="640"/attnum\ name="x"\ val="${DISPLAY_WIDTH}"/ -i src/libs/tgfclient/screen.xml \
&& sed -re s/attnum\ name="y"\ val="480"/attnum\ name="y"\ val="${DISPLAY_HEIGHT}"/ -i src/libs/tgfclient/screen.xml \
&& sed -re "s/\/\/(if \(debugFlag\))/\1/" -i src/modules/graphic/ssggraph/grboard.cpp \
&& sed -re "s/\/\/(if \(boardFlag\))/\1/" -i src/modules/graphic/ssggraph/grboard.cpp \
&& sed -re "s/\/\/(if \(leaderFlag\))/\1/" -i src/modules/graphic/ssggraph/grboard.cpp \
&& sed -re "s/\/\/(if \(counterFlag\))/\1/" -i src/modules/graphic/ssggraph/grboard.cpp \
&& sed -re "s/\/\/(trackMap->display)/\1/" -i src/modules/graphic/ssggraph/grboard.cpp \
&& sed -re "0,/for \(i = 1;/s//for (i = 0;/" -i src/modules/graphic/ssggraph/grscreen.cpp \
&& ./configure \
&& make \
&& make install \
&& make datainstall
ADD run_torcs.sh start.sh
CMD ./start.sh