Resources, code, and issues related to the STRUDEL 2i2c hub infrastructure.
This repository contains the docker image configuration for the software environment on the STRUDEL 2i2c hub. The hub is a JupyterHub deployment hosted at
- https://strudel.2i2c.cloud
- https://staging.strudel.2i2c.cloud (staging hub for testing).
Image management follows the guidance at Update a community-maintained upstream image (recommended) — Hub Service Guide.
This repository uses repo2docker to version control the STRUDEL infrastructure image. The image is configured with the following files:
.
├── Dockerfile
├── README.md
├── environment.yaml
├── install-vscode-ext.sh
├── start.sh
└── vscode-extensions.txt
Dockerfile
: The Dockerfile to build a JupyterHub compatible STRUDEL 2i2c hub image.README.md
: This file.environment.yaml
: The conda environment file for the STRUDEL 2i2c hub image.install-vscode-ext.sh
: A script to install VSCode extensions.start.sh
: A script to run as an ENTRYPOINT to the container.vscode-extensions.txt
: A list of VSCode extensions to install.
See Configuration Files — repo2docker documentation for reference.
We can use nbgitpuller to create a URL that we can provide to the end-user which syncs the contents of the strudel-science/strudel-kit GitHub repository to the STRUDEL 2i2c hub.
We pull the workshop-hub
branch that sets the base URL in a .env.local
file by setting the environment variable VITE_BASE_URL
to the JupyterHub service prefix
VITE_BASE_URL=${JUPYTERHUB_SERVICE_PREFIX}proxy/absolute/5175/
and allows the domain host "strudel.2i2c.cloud" by setting server.allowedHosts
in vite.config.js.
server: {
allowedHosts: ['.strudel.2i2c.cloud'],
}
The nbgitpuller link above is generated with the following parameters in the nbgitpuller link generator:
- JupyterHub URL:
https://strudel.2i2c.cloud
- Git Repository URL:
https://github.com/strudel-science/strudel-kit
- Branch:
workshop-hub
- Application to open: Custom URL:
vscode/?folder=/home/jovyan/strudel-kit
.
In the VSCode IDE, we can open a new terminal by clicking the ☰ icon in the top left corner and selecting Terminal > New Terminal
.
Following the instructions in the strudel-kit README
npm install
to install the strudel-kit dependencies.
npm start
to start the development server on the STRUDEL 2i2c hub. Follow the port forwarding to https://strudel.2i2c.cloud/user/<your-username>/proxy/absolute/5175/
to view the app in another browser window.
Sessions on the workshop hub are culled after a 1 hour period of inactivity, and your work is not saved to a persistent storage disk. Please version control and push your code to GitHub for any work you would like to save for the future.
Running a server consumes resources and costs money. When you are done with your server, please stop it by clicking the Stop My Server
button in the JupyterHub control panel at