Skip to content
Snippets Groups Projects
Dockerfile 1.19 KiB
Newer Older
Engin Eren's avatar
Engin Eren committed
FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime
Engin Eren's avatar
Engin Eren committed
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/$NB_USER

Engin Eren's avatar
Engin Eren committed
RUN apt-get -qq update && \
    apt-get -yqq install libpam-krb5 krb5-user && \
    apt-get -yqq clean && \
    apt-get install -y --no-install-recommends \
        ca-certificates bash-completion tar less \
        python-pip python-setuptools build-essential python-dev \
        python3-pip python3-wheel && \
    rm -rf /var/lib/apt/lists/*

Engin Eren's avatar
Engin Eren committed
# create user and set required ownership
RUN useradd -M -s /bin/bash -N -u ${NB_UID} ${NB_USER} \
     && mkdir -p ${HOME} \
    && chown -R ${NB_USER}:users ${HOME} \
    && chown -R ${NB_USER}:users /usr/local/bin 
Engin Eren's avatar
Engin Eren committed

Engin Eren's avatar
Engin Eren committed
RUN  mkdir -p ${HOME}/models \
Engin Eren's avatar
Engin Eren committed
    && pip install h5py pyflakes comet_ml && export MKL_SERVICE_FORCE_INTEL=1
Engin Eren's avatar
Engin Eren committed
WORKDIR ${HOME}
Engin Eren's avatar
Engin Eren committed
ADD wgan.py ${HOME}/wgan.py
ADD wganHCAL.py ${HOME}/wganHCAL.py
Engin Eren's avatar
Engin Eren committed
ADD wgan_ECAL_HCAL_3crit.py ${HOME}/wgan_ECAL_HCAL_3crit.py
Engin Eren's avatar
Engin Eren committed
COPY ./models/* ${HOME}/models/
Engin Eren's avatar
Engin Eren committed
COPY docker/krb5.conf /etc/krb5.conf

Engin Eren's avatar
Engin Eren committed
RUN mkdir -p /etc/sudoers.d && echo "jovyan ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/jovyan
RUN echo 'PS1="${debian_chroot:+($debian_chroot)}@\h:\w\$ "' >> /etc/bash.bashrc
Engin Eren's avatar
Engin Eren committed
USER $NB_USER
Engin Eren's avatar
Engin Eren committed
ENTRYPOINT ["/bin/bash"]