File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
33echo " Waiting for Jupyter server to be ready..."
4+ retries=0
5+ max_retries=20
46until curl -s -o /dev/null -w ' %{http_code}' http://localhost:8888/api/status | grep -q ' 200' ; do
7+ retries=$(( retries + 1 ))
8+ if [ " $retries " -ge " $max_retries " ]; then
9+ echo " Jupyter server failed to start after $max_retries retries"
10+ exit 1
11+ fi
512 sleep 0.5
613done
714echo " Jupyter server is ready, starting Code Interpreter..."
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pidfile=/var/run/supervisord.pid
77command=/root/.jupyter/start-jupyter.sh
88environment=MATPLOTLIBRC="/root/.config/matplotlib/.matplotlibrc"
99stdout_logfile=/dev/null
10- stderr_logfile=/dev/fd/1
10+ stderr_logfile=/dev/fd/2
1111stderr_logfile_maxbytes=0
1212autorestart=true
1313stopasgroup=true
@@ -19,10 +19,9 @@ command=/root/.jupyter/start-code-interpreter.sh
1919directory=/root/.server
2020stdout_logfile=/dev/fd/1
2121stdout_logfile_maxbytes=0
22- stderr_logfile=/dev/fd/1
22+ stderr_logfile=/dev/fd/2
2323stderr_logfile_maxbytes=0
2424autorestart=true
2525stopasgroup=true
2626killasgroup=true
2727priority=20
28- startsecs=0
You can’t perform that action at this time.
0 commit comments