Skip to content

ESPRI-Mod/sudospawner

 
 

Repository files navigation

SudoSpawner

The SudoSpawner enables JupyterHub to spawn single-user servers without being root, by spawning an intermediate process via sudo, which takes actions on behalf of the user.

The sudospawner mediator, the intermediate process, can only do two things:

  1. send a signal to another process using the os.kill() call
  2. spawn single-user servers

Launching the sudospawner script is the only action that requires a JupyterHub administrator to have sudo access to execute.

Installation and setup

  1. Install:

     pip install -e .
    
  2. Add sudo access to the script.

  3. To configure JupyterHub to use SudoSpawner, add the following to your jupyterhub_config.py:

     c.JupyterHub.spawner_class='sudospawner.SudoSpawner'
    

    The JupyterHub documentation has additional information about creating a configuration file, if needed, and recommended file locations for configuration files.

Example

The Dockerfile in this repo contains an example configuration for setting up a JupyterHub system, without any need to run anything as root.

About

Spawn JupyterHub single-user servers with sudo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%