mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 15:02:57 +00:00
Revert to using supervisord to launch notebook
Used to relaunch notebook and collect logging data.
This commit is contained in:

committed by
Peter Parente

parent
f2b7f38df6
commit
30932a3b12
@@ -20,6 +20,7 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \
|
||||
texlive-latex-extra \
|
||||
texlive-fonts-extra \
|
||||
texlive-fonts-recommended \
|
||||
supervisor \
|
||||
sudo \
|
||||
&& apt-get clean
|
||||
|
||||
@@ -53,4 +54,5 @@ CMD [ "start-notebook.sh" ]
|
||||
|
||||
# Add local files as late as possible to avoid cache busting
|
||||
COPY start-notebook.sh /usr/local/bin/
|
||||
COPY notebook.conf /etc/supervisor/conf.d/
|
||||
COPY jupyter_notebook_config.py /etc/skel/.jupyter/
|
||||
|
10
minimal-notebook/notebook.conf
Normal file
10
minimal-notebook/notebook.conf
Normal file
@@ -0,0 +1,10 @@
|
||||
[program:notebook]
|
||||
user=jovyan
|
||||
umask=0002
|
||||
directory=%(ENV_WORK)s
|
||||
command=ipython notebook
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/%(program_name)s.log
|
||||
redirect_stderr=true
|
||||
environment=HOME="/home/%(ENV_NB_USER)s",USER="%(ENV_NB_USER)s"
|
@@ -12,8 +12,5 @@ if [ ! -z "$GRANT_SUDO" ]; then
|
||||
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
|
||||
fi
|
||||
|
||||
# Run Notebook server as $NB_USER
|
||||
su -l $NB_USER << EOF
|
||||
cd $WORK
|
||||
jupyter notebook
|
||||
EOF
|
||||
# Start supervisord in foreground, PID1
|
||||
exec supervisord -n -c /etc/supervisor/supervisord.conf
|
||||
|
Reference in New Issue
Block a user