-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
85 lines (68 loc) · 2.17 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
FROM ubuntu:16.04
# Cuda 7.5 with cudnn 4.0.7
FROM nvidia/cuda:7.5-devel
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
ENV CUDNN_VERSION 4
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn4=4.0.7 libcudnn4-dev=4.0.7
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
RUN apt-get update && apt-get install -y dbus
# Python with pip
RUN apt-get update && apt-get install -y python-dev python python-pip
RUN pip install pip --upgrade
# Vizdoom and other pip packages if needed
RUN pip --no-cache-dir install \
git+https://github.com/mwydmuch/ViZDoom
RUN pip --no-cache-dir install \
https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
RUN pip --no-cache-dir install opencv-python termcolor tqdm subprocess32 msgpack-python msgpack-numpy
# 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 F1_track1 .
### Do not change this ###
COPY cig2017.wad .
COPY _vizdoom.cfg .
##########################
CMD python my_glorious_agent.py