Skip to content

Commit

Permalink
Add jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
sufuf3 committed Nov 21, 2018
1 parent 7b4a9bc commit 10e2345
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
37 changes: 29 additions & 8 deletions production/tensorrt_18.10-py3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
FROM nvcr.io/nvidia/tensorrt:18.10-py3
RUN set -xe; \
apt-get update; \
apt-get install -y sudo; \
DEBIAN_FRONTEND=noninteractive apt-get -y install libnss-ldap libpam-ldap ldap-utils nscd ;\
DEBIAN_FRONTEND=noninteractive apt-get install -y libpam-ldapd ;\
apt-get -y install openssh-server openssh-client

# Install required packages
RUN apt-get update && \
apt-get install -y sudo && \
DEBIAN_FRONTEND=noninteractive apt-get -y install libnss-ldap libpam-ldap ldap-utils nscd && \
DEBIAN_FRONTEND=noninteractive apt-get -y install libpam-ldapd && \
apt-get install -y openssh-server openssh-client

# Assign slurm as admin(sudo)
RUN echo "%slurm ALL=(ALL:ALL) ALL" >> /etc/sudoers

RUN set -xe; \
echo "session required pam_mkhomedir.so skel=/etc/skel umask=077" >> /etc/pam.d/common-session; \
RUN echo "session required pam_mkhomedir.so skel=/etc/skel umask=077" >> /etc/pam.d/common-session && \
mkdir -p /var/run/sshd

# Install python3's pip package
RUN apt-get install -y libsqlite3-dev \
libzmq3-dev \
python3 \
python3-pip \
python3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN python3 -m pip --version
RUN python3 -m pip install -U setuptools

# install jupyter
RUN python3 -m pip install jupyter
RUN jupyter notebook --generate-config --port 1010
RUN python3 -m pip install --upgrade pip
COPY jupyter_notebook_config.py /root/.jupyter/

# LDAP Config
COPY ldap-auth-config /etc/auth-client-config/profile.d/ldap-auth-config
COPY ldap.conf /etc/ldap.conf
COPY ldap.secret /etc/ldap.secret
RUN chmod 600 /etc/ldap.secret


COPY pam.d /etc/pam.d
COPY nslcd.conf /etc/nslcd.conf

Expand Down
3 changes: 3 additions & 0 deletions production/tensorrt_18.10-py3/jupyter_notebook_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 1025

0 comments on commit 10e2345

Please sign in to comment.