-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
102 lines (80 loc) · 2.35 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
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
FROM ubuntu:16.04
# Cuda 7.5 with cudnn 5
#FROM nvidia/cuda:7.5-cudnn5-devel
# Cuda 8 with cudnn 5
FROM nvidia/cuda:8.0-cudnn5-devel
# ViZdoom dependencies
RUN apt-get update && apt-get install -y \
build-essential \
bzip2 \
cmake \
curl \
git \
libboost-all-dev \
libbz2-dev \
libfluidsynth-dev \
libfreetype6-dev \
libgme-dev \
libgtk2.0-dev \
libjpeg-dev \
libopenal-dev \
libpng12-dev \
libsdl2-dev \
libwildmidi-dev \
libzmq3-dev \
nano \
nasm \
pkg-config \
rsync \
software-properties-common \
sudo \
tar \
timidity \
unzip \
wget \
zlib1g-dev \
python3-dev \
python3 \
python3-pip
# Python with pip
#RUN apt-get install -y python-dev python python-pip
#RUN pip install pip --upgrade
# Python3 with pip3
RUN pip3 install pip --upgrade
# Vizdoom and other pip packages if needed
#RUN pip --no-cache-dir install \
# git+https://github.com/mwydmuch/ViZDoom \
# numpy \
#RUN pip --no-cache-dir install \
# https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
# Vizdoom and other pip3 packages if needed
RUN pip3 --no-cache-dir install \
git+https://github.com/mwydmuch/ViZDoom \
opencv-python
RUN pip3 --no-cache-dir install \
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.1-cp35-cp35m-linux_x86_64.whl
# Enables X11 sharing and creates user home directory
ENV USER_NAME cig2017
ENV HOME_DIR /home/$USER_NAME
# Replace HOST_UID/HOST_GUID with your user / group id (needed for X11)
ENV HOST_UID 1000
ENV HOST_GID 1000
RUN export uid=${HOST_UID} gid=${HOST_GID} && \
mkdir -p ${HOME_DIR} && \
echo "$USER_NAME:x:${uid}:${gid}:$USER_NAME,,,:$HOME_DIR:/bin/bash" >> /etc/passwd && \
echo "$USER_NAME:x:${uid}:" >> /etc/group && \
echo "$USER_NAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER_NAME && \
chmod 0440 /etc/sudoers.d/$USER_NAME && \
chown ${uid}:${gid} -R ${HOME_DIR}
USER ${USER_NAME}
WORKDIR ${HOME_DIR}
# Copy agent files inside Docker image:
COPY config config
COPY sample_random_agent.py .
### Do not change this ###
COPY cig2017.wad .
COPY _vizdoom.cfg .
##########################
# Uncomment to use doom2.wad:
#COPY doom2.wad /usr/local/lib/python3.5/dist-packages/vizdoom
CMD ./sample_random_agent.py