Skip to content

Commit

Permalink
Add supervisord for multiple processes
Browse files Browse the repository at this point in the history
  • Loading branch information
sufuf3 committed Nov 23, 2018
1 parent 04fed80 commit 0b69474
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
12 changes: 8 additions & 4 deletions production/tensorrt_18.10-py3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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
apt-get install -y openssh-server openssh-client supervisor

# Assign slurm as admin(sudo)
RUN echo "%slurm ALL=(ALL:ALL) ALL" >> /etc/sudoers
Expand Down Expand Up @@ -55,13 +55,17 @@ RUN chown root:root /usr
RUN /usr/sbin/auth-client-config -t nss -p lac_ldap

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT /bin/sh /entrypoint.sh
#ENTRYPOINT /bin/sh /entrypoint.sh

WORKDIR "/notebooks"

EXPOSE 22

# IPython
EXPOSE 8888

WORKDIR "/notebooks"

CMD ["/run_jupyter.sh", "--allow-root"]
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord"]

#CMD ["/run_jupyter.sh", "--allow-root"]
14 changes: 14 additions & 0 deletions production/tensorrt_18.10-py3/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[supervisord]
nodaemon=true

[program:nscd]
command=/usr/sbin/service nscd stop

[program:nslcd]
command=/usr/sbin/service nslcd start

[program:sshd]
command=/usr/sbin/sshd -D

[program:jupyter]
command=/run_jupyter.sh --allow-root

0 comments on commit 0b69474

Please sign in to comment.