Skip to content

Commit

Permalink
Update base. Add build log
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Nov 4, 2023
1 parent bb2e910 commit c7a1001
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ numprocs=1
directory=/root
priority=1000
autostart=true
startsecs=0
startsecs=5
startretries=3
autorestart=unexpected
stopsignal=TERM
Expand All @@ -15,7 +15,5 @@ killasgroup=true
stdout_logfile=/var/log/supervisor/jupyter.log
stdout_logfile_maxbytes=10MB
stdout_logfile_backups=1
stderr_logfile=/dev/null
stderr_logfile_maxbytes=0
stderr_logfile_backups=0
redirect_stderr=true
environment=PROC_NAME="%(program_name)s"
8 changes: 4 additions & 4 deletions build/COPY_ROOT/opt/ai-dock/bin/supervisor-jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function cleanup() {

function start() {
if [[ -z $JUPYTER_MODE || ! "$JUPYTER_MODE" = "notebook" ]]; then
JUPYTER_MODE="lab"
JUPYTER_MODE="notebook"
fi

if [[ -z $JUPYTER_PORT ]]; then
Expand All @@ -25,7 +25,7 @@ function start() {

if [[ ${SERVERLESS,,} = "true" ]]; then
printf "Refusing to start $SERVICE_NAME service in serverless mode\n"
exit 0
exec sleep 10
fi

file_content="$(
Expand Down Expand Up @@ -58,12 +58,12 @@ function start() {
wait -n
fi

kill -9 $(lsof -t -i:$LISTEN_PORT) > /dev/null 2>&1 &
kill $(lsof -t -i:$LISTEN_PORT) > /dev/null 2>&1 &
wait -n

printf "\nStarting %s...\n" "${SERVICE_NAME:-service}"

micromamba run -n jupyter jupyter \
exec micromamba run -n jupyter jupyter \
$JUPYTER_MODE \
--allow-root \
--ip=127.0.0.1 \
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY ./COPY_ROOT/ /

# Use build scripts to ensure we can build all targets from one Dockerfile in a single layer.
# Don't put anything heavy in here - We can use multi-stage building above if necessary.
RUN /opt/ai-dock/bin/build/layer0/init.sh
RUN /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log

# Keep init.sh as-is and place additional logic in /opt/ai-dock/bin/preflight.sh
CMD ["init.sh"]

0 comments on commit c7a1001

Please sign in to comment.