diff --git a/README.md b/README.md index 3feb88f4..d0bae984 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ This package formerly included WrapSpawner and ProfilesSpawner, which provide me ```python c = get_config() c.JupyterHub.spawner_class = 'batchspawner.TorqueSpawner' + import batchspawner.api ``` 3. Depending on the spawner, additional configuration will likely be needed. @@ -52,6 +53,7 @@ to run Jupyter notebooks on an academic supercomputer cluster. ```python # Select the Torque backend and increase the timeout since batch jobs may take time to start + import batchspawner.api c.JupyterHub.spawner_class = 'batchspawner.TorqueSpawner' c.Spawner.http_timeout = 120 @@ -117,6 +119,7 @@ clusters, as well as an option to run a local notebook directly on the jupyterhu ```python # Same initial setup as the previous example + import batchspawner.api c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner' c.Spawner.http_timeout = 120 #------------------------------------------------------------------------------ @@ -171,6 +174,10 @@ Added (developer) Changed +* PR #58 changes logic of port selection, so that it is selected *after* the singleuser server starts. This means that the port number has to be conveyed back to JupyterHub. This requires the following changes: + - `jupyterhub_config.py` *must* explicitely import `batchspawner.api` + - If you override `Spawner.cmd`, note that the default command is now `batchspawner-singleuser`, not the default `jupyterhub-singleuser`. This is to add a hook to report the port number back to the hub. + - If you have installed with `pip install -e`, you will have to re-install so that the new script `batchspawner-singleuser` is added to `$PATH`. * Update minimum requirements to JupyterHub 0.8.1 and Python 3.4. * Update Slurm batch script. Now, the single-user notebook is run in a job step, with a wrapper of `srun`. This may need to be removed using `req_srun=''` if you don't want environment variables limited. * Pass the environment dictionary to the queue and cancel commands as well. This is mostly user environment, but may be useful to these commands as well in some cases. #108, #111 If these envioronment variables were used for authentication as an admin, be aware that there are pre-existing security issues because they may be passed to the user via the batch submit command, see #82.