-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration of Jupyter through docker-compose (#1088)
* Working Jupyterhub Integration * Linting * Handling logout * Updating docker-compose to keep jupyterhub version static * Incorporating feedback * Working Jupyterhub Integration * Linting * Handling logout * Updating docker-compose to keep jupyterhub version static * Incorporating feedback * Fix conflict * Fix config * Creating a traefik setup for prod docker-compose * Make it work for dev set up * Updating .env ecample * better file names * Updated prod webpack and a shell script for prod setup --------- Co-authored-by: Luigi Marini <[email protected]> Co-authored-by: Chen Wang <[email protected]>
- Loading branch information
1 parent
c5aa719
commit f982515
Showing
21 changed files
with
637 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,3 +82,4 @@ secrets.yaml | |
# faker | ||
official.csv | ||
fact.png | ||
jupyterhub/.env-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3' | ||
services: | ||
jupyterhub: | ||
build: | ||
context: jupyterhub | ||
dockerfile: Dockerfile.jupyterhub | ||
args: | ||
JUPYTERHUB_VERSION: 4 | ||
restart: always | ||
networks: | ||
- clowder2 | ||
volumes: | ||
# The JupyterHub configuration file | ||
- ./jupyterhub/jupyterhub_dev_config.py:/srv/jupyterhub/jupyterhub_config.py:ro | ||
# Bind Docker socket on the hostso we can connect to the daemon from | ||
# within the container | ||
- /var/run/docker.sock:/var/run/docker.sock:rw | ||
# Bind Docker volume on host for JupyterHub database and cookie secrets | ||
- jupyterhub-data:/data | ||
ports: | ||
- "8765:8000" | ||
env_file: | ||
- jupyterhub/.env-dev | ||
command: jupyterhub -f /srv/jupyterhub/jupyterhub_config.py | ||
|
||
depends_on: | ||
- keycloak | ||
|
||
volumes: | ||
jupyterhub-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: '3' | ||
services: | ||
jupyterhub: | ||
build: | ||
context: jupyterhub | ||
dockerfile: Dockerfile.jupyterhub | ||
args: | ||
JUPYTERHUB_VERSION: 4 | ||
restart: always | ||
networks: | ||
- clowder2 | ||
volumes: | ||
# The JupyterHub configuration file | ||
- ./jupyterhub/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py:ro | ||
# Bind Docker socket on the hostso we can connect to the daemon from | ||
# within the container | ||
- /var/run/docker.sock:/var/run/docker.sock:rw | ||
# Bind Docker volume on host for JupyterHub database and cookie secrets | ||
- jupyterhub_data:/data | ||
env_file: | ||
- jupyterhub/.env | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.jupyterhub.rule=PathPrefix(`/jupyterhub`)" | ||
- "traefik.http.services.jupyterhub.loadbalancer.server.port=8000" | ||
|
||
command: jupyterhub -f /srv/jupyterhub/jupyterhub_config.py | ||
|
||
depends_on: | ||
- keycloak | ||
|
||
volumes: | ||
jupyterhub_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env sh | ||
if [ "$1" = "prod" ] && [ "$2" = "up" ] | ||
then | ||
docker-compose -f docker-compose.yml -f docker-compose.jupyter.yml up -d | ||
fi | ||
|
||
if [ "$1" = "prod" ] && [ "$2" = "down" ] | ||
then | ||
docker-compose -f docker-compose.yml -f docker-compose.jupyter.yml down | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Example configuration file for Clowder JupyterHub | ||
KEYCLOAK_HOSTNAME="keycloak:8080/keycloak" | ||
# Development mode use the following line instead | ||
#KEYCLOAK_HOSTNAME="keycloak:8080/keycloak" | ||
KEYCLOAK_AUDIENCE="clowder" | ||
KEYCLOAK_REALM="clowder" | ||
JUPYTERHUB_ADMIN="admin" | ||
#Change network name to the one created by docker-compose | ||
DOCKER_NETWORK_NAME="clowder2_clowder2" | ||
DOCKER_NOTEBOOK_IMAGE="quay.io/jupyter/base-notebook:latest" | ||
DOCKER_NOTEBOOK_DIR="/home/jovyan/work" | ||
JUPYTERHUB_CRYPT_KEY="" | ||
CLOWDER_URL="localhost" | ||
PROD_DEPLOYMENT="false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG JUPYTERHUB_VERSION | ||
FROM quay.io/jupyterhub/jupyterhub:$JUPYTERHUB_VERSION | ||
|
||
# Install dockerspawner, | ||
# hadolint ignore=DL3013 | ||
RUN python3 -m pip install --no-cache-dir \ | ||
dockerspawner | ||
|
||
# Install custom authenticator | ||
WORKDIR /tmp/authenticator/ | ||
COPY authenticator /tmp/authenticator/ | ||
RUN pip3 install /tmp/authenticator | ||
|
||
CMD ["jupyterhub", "-f", "/srv/jupyterhub/jupyterhub_config.py"] |
Empty file.
Oops, something went wrong.