Skip to content

JonjonHays/jupyterlab-slurm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jupyterlab-slurm

A JupyterLab extension to interface with the Slurm workload manager.

Prerequisites for Installation

  • JupyterLab
  • NodeJS

Prerequisites for running

  • JupyterLab
  • NodeJS
  • Slurm

Note that if you are using JupyterLabHub, currently (v0.1.0) the locations of the:

  • hub server
  • single-user JupyterLab servers
  • Slurm installation

all have to be the same as each other for this extension to work. We are looking for a fix for this. Suggestions are welcome.

(Development) Installation

Notebook server extension (permanent)

To install the notebook server extension, do the following in the repository directory:

pip install .
jupyter serverextension enable --py jupyterlab-slurm --sys-prefix

Ostensibly it should be sufficient to do the following to uninstall the server extension:

jupyter serverextension disable jupyterlab-slurm
pip uninstall jupyterlab-slurm

However, it has seemed necessary at times to uninstall and then reinstall Jupyter altogether (with conda conda uninstall jupyter_core), since serverextension disable does not seem to delete or remove the extension. Thus, even after sourcing a newer version of the server extension, doing serverextension enable would just re-enable the old version (rather than installing the newer version). (Plus having the output of jupyter serverextension list cluttered by no longer existing extensions is unpleasant.)

Notebook server extension (temporary)

A less permanent way to enable the notebook extension during development would be to add the following flag when starting JupyterLab:

--NotebookApp.nbserver_extensions="{'jupyterlab-slurm':True}"

JupyterLab extension

To install the "JupyterLab extension" (i.e. the TypeScript/Javascript part), do the following in the repository directory (requires NodeJS v. 4.0 or higher):

npm install
npm run build
jupyter labextension install .

To reload after updating or changing the Javascript part of the extension, it is necessary to do the following:

npm run build
jupyter lab build

(This assumes you haven't added any npm dependencies to package.json; if you have, then it is necessary to run npm install before npm run build.)

To uninstall the Javascript part of the extension entirely, it suffices to do

jupyter labextension uninstall jupyterlab-slurm

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 40.8%
  • TypeScript 37.1%
  • CSS 22.1%