FROM centos

RUN yum install git -y

# Required by CUDA
# libvdpau and dkms

# Install libvdpau
RUN echo "[linuxtech]\n
            name=LinuxTECH\n
            baseurl=http://pkgrepo.linuxtech.net/el6/release/\n
            enabled=1\n
            gpgcheck=1\n
            gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET\n" \
            > /etc/yum.repos.d/linuxtech.repo
RUN yum install libvdpau -y

# Install dkms
RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RUN yum install dkms -y

# Install CUDA
RUN cd /tmp
RUN wget http://developer.download.nvidia.com/compute/cuda/repos/rhel6/x86_64/cuda-repo-rhel6-6.5-14.x86_64.rpm
RUN yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
RUN yum install cuda-6.5 -y
RUN rm /tmp/cuda-repo-rhel6-6.5-14.x86_64.rpm

# Add user for execution Eos
RUN useradd EosUser
RUN su EosUser

# Download and Install Eos
RUN cd
RUN curl -L https://sourceforge.jp/projects/eos/scm/git/base/blobs/master/env/Eos_env?export=raw > ${HOME}/.Eos_env
RUN source .Eos_env
RUN git clone --depth 1 https://scm.sourceforge.jp/gitroot/eos/base.git ${HOME}/Eos
RUN mkdir ${EOS_HOME}/hostdepend
RUN git clone --depth 1 http://scm.sourceforge.jp/gitroot/eos/hostdepend${EOS_HOSTDIR}.git ${EOS_HOME}/hostdepend/${EOS_HOSTDIR}

