Created
December 17, 2017 03:14
-
-
Save guiambros/1ee62876fb309207b02eb69c8c7b39fa to your computer and use it in GitHub Desktop.
Vizdoom Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:17.04 | |
WORKDIR /root | |
ARG CONDA_VERSION=Anaconda3-4.4.0-Linux-x86_64.sh | |
ARG CONDA_PATH=/opt/conda | |
ARG USER=vizdoom | |
# Install standard dev packages | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
bzip2 \ | |
cmake \ | |
curl \ | |
g++ \ | |
git \ | |
make \ | |
nasm \ | |
openssh-server \ | |
tar \ | |
timidity \ | |
vim \ | |
zip \ | |
# Install libraries required by VizDoom | |
libboost-all-dev \ | |
libbz2-dev \ | |
libfluidsynth-dev \ | |
libgme-dev \ | |
libgtk-3-dev \ | |
libgtk2.0-dev \ | |
libjpeg-dev \ | |
liblua5.1-dev \ | |
libmpg123-dev \ | |
libopenal-dev \ | |
libpython3.6 \ | |
libsdl2-dev \ | |
libsndfile1-dev \ | |
libwildmidi-dev \ | |
python3-pip \ | |
zlib1g-dev \ | |
x11-apps \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install conda | |
# | |
ENV PATH $CONDA_PATH/bin:$PATH | |
RUN echo "export PATH=$CONDA_PATH/bin:\$PATH" >> .profile \ | |
&& wget --no-verbose https://repo.continuum.io/archive/$CONDA_VERSION \ | |
&& /bin/bash $CONDA_VERSION -b -f -p $CONDA_PATH \ | |
&& rm $CONDA_VERSION \ | |
&& conda install boost -y \ | |
&& conda update --all -y | |
# Install VizDoom | |
# | |
RUN ln -s $CONDA_PATH/lib/libpython3.6m.so.1.0 $CONDA_PATH/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so \ | |
&& ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.62.0 /usr/lib/x86_64-linux-gnu/libboost_python3.so | |
RUN git clone https://github.com/mwydmuch/ViZDoom \ | |
&& cd ViZDoom \ | |
&& pip install . | |
# Install sshd | |
# | |
RUN mkdir /var/run/sshd \ | |
&& echo 'root:x' | chpasswd \ | |
&& sed -i 's/PermitRootLogin/#PermitRootLogin/' /etc/ssh/sshd_config \ | |
&& echo "PermitRootLogin yes" >> /etc/ssh/sshd_config \ | |
&& touch /var/log/sshd.log | |
# Add regular user | |
# | |
RUN groupadd $USER \ | |
&& useradd -g $USER -G audio,video $USER \ | |
&& mkdir -p /home/$USER \ | |
&& chown $USER:$USER -R /home/$USER | |
# Move ViZDoom to / | |
# | |
RUN cd \ | |
&& mv ViZDoom /vizdoom \ | |
&& chown -R $USER.$USER /vizdoom \ | |
&& cd /home/$USER | |
RUN echo "alias dir='ls -la'\ncd /vizdoom" >> /etc/profile | |
# Run as non privileged user | |
# | |
EXPOSE 22 | |
USER $USER | |
CMD ["/bin/bash", "-l"] | |
# DEBUG - Test sound | |
#ADD piano.wav /src/piano.wav | |
#RUN apt-get update && apt-get install -y alsa-utils | |
# DEBUG - SSHD | |
#CMD ["/usr/sbin/sshd", "-D"] | |
#CMD ["/usr/sbin/sshd", "-D", "-dd", "-E", "/tmp/sshd.log"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment