Skip to main content

A tool for building Docker images for Civis Platform Jupyter notebooks.

Project description

A tool to enable any Docker image to be used with Civis Platform Jupyter notebooks.


In your Dockerfile, put the following code at the end:

ENV DEFAULT_KERNEL <your kernel>  # set to python3 or ir

RUN pip install civis-jupyter-notebook && \

# Add Tini
ADD${TINI_VERSION}/tini /tini
RUN chmod +x /tini

WORKDIR /root/work
ENTRYPOINT ["/tini", "--"]
CMD ["civis-jupyter-notebooks-start"]

Here you need to replace <your kernel> with the name of your kernel (e.g., python3 or ir). Note that your Dockerfile must use root as the default user.

See the example Docker image for more details.

Integration Testing Docker Images with the Civis Platform

If you would like to test your image’s integration with the Civis Platform locally follow the steps below:

  1. Create a notebook in your Civis Platform account and grab the id of the notebook. This ID is the number that appears at the end of the URL for the notebook,<NOTEBOOK ID>.

  2. Create an environment file called my.env and add the following to it:

  3. Build your image locally: docker build -t test ..

  4. Run the container: docker run --rm -p 8888:8888 --env-file my.env test.

  5. Access the notebook at the ip of your Docker host with port 8888 (e.g., http://localhost:8888/notebooks/notebook.ipynb).

Integration Testing Code Changes with the Civis Platform

The scripts tests/ and tests/ can be used to test the integration of coee changes with the Civis Platform.

From the top directory in the repo type:

$ ./test/
$ ./test/ <NOTEBOOK ID>

where <NOTEBOOK ID> is the ID of a Civis Platform notebook. See step 1 above if you do not have a notebook ID. Then you can connect to the notebook from your local browser and check to make sure it is working properly.


See for information about contributing to this project.



See for details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for civis-jupyter-notebook, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size civis-jupyter-notebook-2.0.0.tar.gz (82.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page