Skip to content

Commit 1914c4a

Browse files
committed
kill uvicorn on jupyter death
1 parent c36ff29 commit 1914c4a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

template/start-jupyter.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
/usr/local/bin/jupyter server --IdentityProvider.token=""
4+
5+
# Jupyter exited — kill code-interpreter so supervisord restarts both
6+
echo "Jupyter exited, killing code-interpreter..."
7+
pkill -f "uvicorn main:app"

template/supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ logfile=/var/log/supervisord.log
44
pidfile=/var/run/supervisord.pid
55

66
[program:jupyter]
7-
command=/usr/local/bin/jupyter server --IdentityProvider.token=""
7+
command=/root/.jupyter/start-jupyter.sh
88
environment=MATPLOTLIBRC="/root/.config/matplotlib/.matplotlibrc"
99
stdout_logfile=/dev/null
1010
stderr_logfile=/dev/fd/1

0 commit comments

Comments
 (0)