0

Is it possible to point to private github repository or AWS S3 as notebook directory for Jupyterhub notebook servers?

In Jupyterhub config file, I can set C.Spawner.notebook_dir to point to local directories but how can I point to a fileshare protected by password or to a private github repository or AWS S3?

There is some information here - https://github.com/jupyterhub/jupyterhub/issues/314 on customizing the directory location for each user. Is there a way to extend the custom spawner class to have the ability to point to private github or S3?

Ram
  • 1

1 Answers1

0

The simplest way, if you can satisfy the requirements, would be to use the S3 FUSE filesystem, to mount an S3 bucket at a path in your local directory tree.

You could also further extend the custom spawner in that issue to re-clone/update a github repo every time you spawn a notebook (and then pass the path into the notebook), but that would be pretty slow. Also in that case the user account running the spawner needs to be able to read the credentials for the github account. The S3 solution allows you to do this outside of the Jupyter workflow, allowing you to preserve credentials with a different permissions scheme.

Nick Bastin
  • 30,415
  • 7
  • 59
  • 78
  • Thank you Nick! The idea is to check-in ipynb files to github repo and provide access to those notebooks to a team of data scientists and engineers. I could either clone github repo directly or deploy repo contents to S3 and point to it but this approach has files located in two places. What is the best practice for this requirement?\n For github repo, I can authenticate github repo at the hub level and clone the repo to a common directory that all the notebook servers can point to right? – Ram Mar 24 '17 at 18:07