Skip to content

Commit

Permalink
Merge branch 'develop' into mtalbott-runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
marctalbott authored Jan 9, 2025
2 parents d1b123e + 59aaba2 commit 5702f8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion http/src/main/resources/init-resources/shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ else
DOCKER_COMPOSE='docker-compose'
fi

$DOCKER_COMPOSE down
$DOCKER_COMPOSE down
8 changes: 6 additions & 2 deletions http/src/main/resources/init-resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ RUNTIME_NAME=${RUNTIME_NAME}
OWNER_EMAIL=${OWNER_EMAIL}
PET_SA_EMAIL=${PET_SA_EMAIL}
WELDER_ENABLED=${WELDER_ENABLED}
MEM_LIMIT=${MEM_LIMIT}
SHM_SIZE=${SHM_SIZE}
END

Expand All @@ -256,6 +255,9 @@ END
docker restart $JUPYTER_SERVER_NAME
docker restart $WELDER_SERVER_NAME

# update memory size, the memory swap must be updated as well (cannot be < memory)
docker update --memory ${MEM_LIMIT} --memory-swap ${MEM_LIMIT} $JUPYTER_SERVER_NAME

log 'Copy Jupyter frontend notebook config...'
$GSUTIL_CMD cp ${JUPYTER_NOTEBOOK_FRONTEND_CONFIG_URI} /var
JUPYTER_NOTEBOOK_FRONTEND_CONFIG=`basename ${JUPYTER_NOTEBOOK_FRONTEND_CONFIG_URI}`
Expand All @@ -277,14 +279,16 @@ RUNTIME_NAME=${RUNTIME_NAME}
OWNER_EMAIL=${OWNER_EMAIL}
PET_SA_EMAIL=${PET_SA_EMAIL}
WELDER_ENABLED=${WELDER_ENABLED}
MEM_LIMIT=${MEM_LIMIT}
SHM_SIZE=${SHM_SIZE}
END

# We do not want to recreate a new container, to make sure we preserve the changes that users made with the startup script
# We only want to restart the existing container with the latest environment variables
${DOCKER_COMPOSE} --env-file=/var/variables.env ${COMPLETE_RSTUDIO_DOCKER_COMPOSE} up -d --no-recreate

# update memory size, the memory swap must be updated as well (cannot be < memory)
docker update --memory ${MEM_LIMIT} --memory-swap ${MEM_LIMIT} $RSTUDIO_SERVER_NAME

# the docker containers need to be restarted or the R container
# will fail to start until the appropriate volume/device exists.
docker restart $RSTUDIO_SERVER_NAME
Expand Down

0 comments on commit 5702f8c

Please sign in to comment.