Papermill Docker CLI · ![Docker Cloud Build Status](https://camo.githubusercontent.com/3070f526a1889ef4a3d73a39b145438eee7d85cd42f3f767f5d11aaeae53521e/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f636c6f75642f6275696c642f63617363616e64616c6961746f2f70617065726d696c6c3f6c6f676f3d646f636b6572267374796c653d666c61742d737175617265)
Papermill is a tool for parameterizing and executing Jupyter Notebooks. This is a dockerized version meant to be called from the command line. It includes all pre-requisites, except for Docker itself.
- Install Docker.
- Open a command prompt or shell, move to the folder containing your notebooks.
- Run:
- (Windows)
docker run --mount type=bind,source=%CD%,destination=/notebooks cascandaliato/papermill <options>
- (Linux)
docker run --mount type=bind,source=$(pwd),destination=/notebooks cascandaliato/papermill <options>
- (Windows)
For example, docker run --mount type=bind,source=$(pwd),destination=/notebooks cascandaliato/papermill input.ipynb output.ipynb
will execute notebook input.ipynb
and save the updated notebook to output.ipynb
.
For the list of supported commands, read the official usage instructions or run:
- (Windows)
docker run --mount type=bind,source=%CD%,destination=/notebooks cascandaliato/papermill
- (linux)
docker run --mount type=bind,source=$(pwd),destination=/notebooks cascandaliato/papermill
If your notebook requires additional packages, you can specify them within text files to be placed in same folder as your notebooks:
- (Ubuntu packages)
apt-requirements.txt
- (Python3 packages)
requirements.txt
These files should contain one package per line.