JupyterΒΆ
DescriptionΒΆ
Jupyter runs code in a managed kernel and returns its output. This role provides that kernel as a backend for other services rather than as a notebook UI for people.
OverviewΒΆ
The server starts with a token from the deploymentβs credential store, binds to the container network and publishes no port. Cross-site request checking is off and any origin is accepted, because the caller is a service on the same network that presents the token rather than a browser carrying a cookie.
The role declares no volume: a kernel that executes code a chat wrote gets a fresh filesystem on every restart. A consumer reaches it as http://jupyter:8888 once it declares jupyter in its own meta/services.yml with enabled and shared set. web-app-openwebui ships that flag and sends CODE_EXECUTION_ENGINE=jupyter with it.
ArchitectureΒΆ
ARCHITECTURE.md draws Jupyter from its own metadata: the containers it runs under compose, what changes under swarm, how each volume is backed, and every role it depends on or is depended upon by.
Section |
Drawn from |
|---|---|
|
|
|
|
|
|
|
FeaturesΒΆ
Token protected: every request carries a token from the credential store; the token is never handed to a browser user.
Ephemeral: no volume is mounted, so each restart discards whatever the executed code wrote.
Internal only: no published port and no proxy entry, so the kernel is reachable from the container network alone.
Quick SetupΒΆ
DevelopmentΒΆ
Clone, set up the workstation, and deploy Jupyter onto the local stack:
git clone https://github.com/infinito-nexus/core.git
cd core
make onboard
make compose-deploy mode=reinstall apps=svc-ai-jupyter full_cycle=false
ProductionΒΆ
Run the published image to provision the inventory and deploy Jupyter to a managed server over SSH. The image logs in as root, so the server must accept root over a public key, and the two key variables are the two halves of one key pair: the private half authenticates the deploy, and the public half is what the deploy keeps authorized for root and installs for the administrator account. Naming a public half that does not belong to the private one locks the running deploy out at its next reconnect.
APP=svc-ai-jupyter
HOST="<your-server>"
DOMAIN="<your-domain>"
TLS_MODE=self_signed
SSH_PUBLIC_KEY="<your-ssh-public-key>"
SSH_PRIVATE_KEY="<your-ssh-private-key-file>"
WORKDIR="$HOME/.infinito.nexus"
mkdir -p "$WORKDIR/inventories"
docker run --rm \
-v "$WORKDIR/inventories:/etc/infinito.nexus/inventories" \
-v "$SSH_PRIVATE_KEY:/run/secrets/deploy_key:ro" \
-e APP="$APP" -e HOST="$HOST" -e DOMAIN="$DOMAIN" -e TLS_MODE="$TLS_MODE" -e SSH_PUBLIC_KEY="$SSH_PUBLIC_KEY" \
ghcr.io/infinito-nexus/core/debian:latest bash -c '
INVENTORY=/etc/infinito.nexus/inventories/production
infinito administration inventory provision "$INVENTORY" \
--inventory-file "$INVENTORY/devices.yml" \
--host "$HOST" \
--include "$APP" \
--vars "{\"TLS_MODE\": \"$TLS_MODE\", \"DOMAIN_PRIMARY\": \"$DOMAIN\", \"SYS_SVC_SSHD_PERMIT_ROOT_LOGIN\": \"prohibit-password\", \"users\": {\"root\": {\"authorized_keys\": [\"$SSH_PUBLIC_KEY\"]}, \"administrator\": {\"authorized_keys\": [\"$SSH_PUBLIC_KEY\"]}}}" &&
infinito administration deploy dedicated "$INVENTORY/devices.yml" \
--password-file "$INVENTORY/.password" \
-u root --private-key /run/secrets/deploy_key \
--diff -vv'
The inventory under $WORKDIR is written by the container as root, including the vault password at inventories/production/.password. Run sudo chown -R "$USER" "$WORKDIR" afterwards to read it.
CreditsΒΆ
Part of the Infinito.Nexus Project and maintained by Kevin Veen-Birkenbach. Licensed under the Infinito.Nexus Community License (Non-Commercial).
That licence covers this role. The software it deploys is a separate grant: BSD-3-Clause, under which commercial use is allowed. You owe its authors this much: keep the copyright notice and the licence text. Permission for one of the two is not permission for the other.