Tools to add authenticated Jupyter Notebooks to images for CentOS 7+ and Ubuntu 16.04+
Note: updates to packages needed to comprise the notebook-common offering and the dependency issues arising mean that Ubuntu Trusty and CentOS 6 are no longer supported
To add Jupyter Notebook capabilities to your Docker image:
ADD https://raw.githubusercontent.com/nimbix/notebook-common/${BRANCH:-master}/install-notebook-common /tmp/install-notebook-common
RUN bash /tmp/install-notebook-common -b "$BRANCH" -c && rm /tmp/install-notebook-common
To install Python 3 notebooks pass the single argument -3
:
RUN bash /tmp/install-notebook-common -b "$BRANCH" -c -3 && rm /tmp/install-notebook-common
/usr/local/bin/nimbix_notebook -s /usr/local/scripts/myscript
/usr/local/bin/nimbix_notebook -r ${HOME}/requirements.txt
/usr/local/bin/nimbix_notebook -c my-conda-env
/usr/local/bin/nimbix_notebook -u my-base-path
Once started, the notebook may be accessed by clicking on the running application on the JARVICE dashboard. Sessions are authenticated using randomly generated tokens.
docker run --rm -h JARVICE -p 5902:5902 mycontainer /usr/local/bin/nimbix_notebook -l
(Replace mycontainer
with the name of the Docker image you built locally.)
To connect to the above example container running the notebook, open a browser and browse to http://localhost:5902. Note: Local testing does not use https:// or password/token authentication.
If using the url
key in the AppDef, set to exactly this value:
http://%PUBLICADDR%:5902/tree?token=%RANDOM64%
JARVICE will automatically SSL-terminate and rewrite the address for the appropriate site Ingress configuration.