Created
March 11, 2020 15:09
-
-
Save juliendehos/d23d876b3c6c7d9d9e655aa535df361f to your computer and use it in GitHub Desktop.
Dockerfile for Polygames on Centos 7 (WIP)
This file contains 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 nvidia/cuda:10.2-cudnn7-devel-centos7 | |
RUN yum update -y | |
RUN yum install -y git sudo wget which make cmake | |
RUN yum install -y centos-release-scl | |
RUN yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ | |
RUN yum install -y epel-release | |
RUN yum install -y zeromq-devel | |
RUN useradd -ms /bin/bash -G wheel myuser | |
RUN echo "myuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
USER myuser | |
ENV USER="myuser" | |
ENV HOME="/home/myuser" | |
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/ | |
WORKDIR $HOME | |
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
RUN bash Miniconda3-latest-Linux-x86_64.sh -b | |
ENV PATH="/home/myuser/miniconda3/bin:$PATH" | |
RUN source "/home/myuser/miniconda3/etc/profile.d/conda.sh" | |
RUN conda create --name myenv python=3.7 pip | |
RUN source activate myenv | |
RUN conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing | |
RUN conda install -c pytorch magma-cuda100 | |
RUN conda install -c conda-forge tensorboardx | |
RUN pip install visdom | |
# RUN git clone --recursive https://github.com/pytorch/pytorch --branch=v1.1.0 | |
# WORKDIR $HOME/pytorch | |
# ENV CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} | |
# RUN scl enable devtoolset-8 -- python setup.py install | |
RUN scl enable devtoolset-8 -- conda install pytorch=1.1.0 | |
WORKDIR $HOME | |
RUN git clone https://github.com/facebookincubator/Polygames.git | |
RUN mkdir $HOME/Polygames/build | |
WORKDIR $HOME/Polygames/build | |
RUN scl enable devtoolset-8 -- cmake .. | |
RUN scl enable devtoolset-8 -- make -j4 | |
RUN mkdir $HOME/Polygames/tests/build | |
WORKDIR $HOME/Polygames/tests/build | |
RUN scl enable devtoolset-8 -- cmake .. | |
RUN scl enable devtoolset-8 -- make -j4 | |
RUN ./polygames-tests | |
WORKDIR $HOME/Polygames/ | |
# docker build -t polygames -f Dockerfile . | |
# docker run --rm -it polygames | |
# python -m pypolygames train --game_name Hex11 --device=cpu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment