Skip to content

Commit

Permalink
feat: workspace docker image (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheikhgwane authored Nov 24, 2023
1 parent 5c3f047 commit 75e3e74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This compose file can be useful to develop and debug Jupyterhub code locally.
# It is not meant to be deployed in production.

version: '3'
version: "3.9"

services:
jupyterhub:
Expand Down Expand Up @@ -38,8 +38,6 @@ services:

jupyter: # just used for building - the jupyterhub service will spawn jupyter containers on demand
build: jupyter
networks:
- openhexa
platform: linux/amd64
image: openhexa-base-notebook
command: echo
Expand Down
5 changes: 5 additions & 0 deletions jupyterhub/config/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ async def pre_spawn_start(self, user, spawner):

# Let's use the hash generated on the app side
spawner.pod_name = f"jupyter-{credentials_data['notebooks_server_hash']}"

# SET DOCKER IMAGE
if credentials_data.get("image") is not None:
self.log.info(f"Using custom image: {credentials_data['image']}")
spawner.image = credentials_data["image"]

# Disable persistent storage in workspaces
if len(spawner.volumes) > 0 and spawner.volumes[0]["name"].startswith(
Expand Down

0 comments on commit 75e3e74

Please sign in to comment.