Skip to content

Commit

Permalink
Merge pull request #67 from kinow/update-docs-jupyterlab
Browse files Browse the repository at this point in the history
Update running JupyterLab docs for SudoSpawner
  • Loading branch information
consideRatio authored Dec 14, 2023
2 parents f9e4549 + 7ebbbaf commit adc6298
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ JupyterHub administrator to have ``sudo`` access to execute.
has additional information about [creating a configuration file](https://jupyterhub.readthedocs.io/en/latest/getting-started/config-basics.html#generate-a-default-config-file),
if needed, and recommended file locations for configuration files.

## Custom singleuser launch command
If you would like to use JupyterLab, then all you have to do is set the `default_url`
in `jupyterhub_config.py`:

c.Spawner.default_url = '/lab'

## Custom singleuser launch command

In order to limit what permissions the use of sudospawner grants the Hub,
when a single-user server is launched
Expand Down Expand Up @@ -64,20 +68,6 @@ conda info
exec "$(dirname "$0")/jupyterhub-singleuser" $@
```

## SudoSpawner with JupyterLab-Hub singleuser launch command


In order to have SudoSpawner work with JupyterLab-Hub you will need to create a custom singleuser launch command.
Create the script `sudospawner-singleuser` containing the below code in the same directory as `sudospawner` and grant it the same permissions.


```bash
#!/bin/bash -l

# Delegate the notebook server launch to the jupyter-labhub script.
exec "jupyter-labhub" $@
```

## Example

The [Dockerfile](https://github.com/jupyter/sudospawner/blob/master/examples/Dockerfile) in this repo contains an example configuration for setting up a JupyterHub system, without any need to run anything as root.

0 comments on commit adc6298

Please sign in to comment.