Skip to content

Instantly share code, notes, and snippets.

@schrockn
Last active February 5, 2019 23:30
Show Gist options
  • Save schrockn/7527143f25ae2584065fbb02fe47e212 to your computer and use it in GitHub Desktop.
Save schrockn/7527143f25ae2584065fbb02fe47e212 to your computer and use it in GitHub Desktop.

We propose a convention for creating repos to house containerized kernels

We would have a scaffolding script that creates:

project_name/
   requirements.txt # pip freeze
   Dockerfile # perhaps through repo2docker + custom scripts
   notebooks/ # empty folder
   kernelspecs/
      project_name/
         kernel.json

Project Layout:

project_name/
  requirements.txt
  Dockerfile
  notebooks/
    notebook1.ipynb
  kernelspecs/
    project_name/
      kernel.json

Kernel.json would be configured to launch the container described in Dockerfile..

kernelspecs installed via jupyter kernelspec install

The Dockerfile would have an ENTRYPOINT that launches the python shell with appropriate file after copying pip -r requirements.txt into the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment