Skip to content

Commit

Permalink
update base
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Oct 25, 2023
1 parent 06cf264 commit bb2e910
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 39 deletions.
28 changes: 0 additions & 28 deletions build/COPY_ROOT/opt/ai-dock/bin/get-cfqt-jupyter.sh

This file was deleted.

4 changes: 2 additions & 2 deletions build/COPY_ROOT/opt/ai-dock/bin/jupyter-start-service.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ -f /run/provisioning_script ]]; then
printf "** The container is still being provisioned **\n\n"
if [[ -f /run/container_config || -f /run/workspace_sync ]]; then
printf "** The container is still being prepared **\n\n"
printf "Your service will start automatically - Check the logs for progress (logtail.sh)\n\n"
elif [[ -z $1 ]]; then
printf "Please specify a service to start\n\n"
Expand Down
13 changes: 5 additions & 8 deletions build/COPY_ROOT/opt/ai-dock/bin/supervisor-jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,27 @@ function start() {
printf "%s" "$file_content" > /run/http_ports/$PROXY_PORT

# Delay launch until micromamba is ready
if [[ -f /run/workspace_moving ]]; then
if [[ -f /run/workspace_sync ]]; then
printf "Waiting for workspace sync...\n"
/usr/bin/python3 /opt/ai-dock/fastapi/logviewer/main.py \
-p $LISTEN_PORT \
-r 5 \
-r 3 \
-s "${SERVICE_NAME}" \
-t "Preparing ${SERVICE_NAME}" &
fastapi_pid=$!

while [[ -f /run/workspace_moving ]]; do
while [[ -f /run/workspace_sync ]]; do
sleep 1
done

printf "\nStarting %s... " ${SERVICE_NAME:-service}
kill $fastapi_pid &
wait -n
printf "OK\n"
else
printf "Starting %s...\n" ${SERVICE_NAME}
fi

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

printf "Starting Jupyter %s...\n" ${JUPYTER_MODE^}
printf "\nStarting %s...\n" "${SERVICE_NAME:-service}"

micromamba run -n jupyter jupyter \
$JUPYTER_MODE \
Expand Down
1 change: 0 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LABEL org.opencontainers.image.description "Jupyter lab/notebook with Python ker

LABEL maintainer="Rob Ballantyne <rob@dynamedia.uk>"

ENV OPT_SYNC=$OPT_SYNC
ENV IMAGE_SLUG="jupyter-python"

# Add new paths at front
Expand Down

0 comments on commit bb2e910

Please sign in to comment.