Simply runs jupyter notebook server on 8888
port (example for Puzl cloud).
- Python 3.6 or higher
requirements.txt
All the requirements are installing in run.sh
file, which should be set as a Docker entry point.
Choose any Docker image, contains:
- Needed version of Python.
- Jupyter Notebook.
or use any pre-defined machine learning image from Puzl cloud. You can find dockerfiles here.
To use your repo from Github without ssh inside a Docker container, generate and use personal access token.
https://[email protected]/puzl-ee/example-jupyter-notebook-server.git
This will install all requirements.txt
and run application then.
bash ./run.sh
Add port 8888
via Puzl dashboard.
Kubernetes Service
will be created for your pod automatically.
NOTEBOOK_DIR
- optional path to Jupyter directory, default is /media
Notice: if you use Puzl dashboard, we highly recommend to create a volume and put its path
/media/%volume_name%
toNOTEBOOK_DIR
After your pod is up and running in Kubernetes cluster:
- View logs of this pod.
- Find Jupyter access token in logs.
- Copy token.
- Access your Jupyter by a given external port and host name with
YOUR_TOKEN
copied from pod's logs.
http://host:external_port/?token=YOUR_TOKEN
Ignore browser errors because self-signed certificate is used.
If you don't need ssl:
- Comment 1 line in
run.sh
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/mykey.key -out /tmp/mycert.pem
- Comment 2 lines in
jupyter_notebook_config.py
c.NotebookApp.certfile = '/tmp/mycert.pem'
c.NotebookApp.keyfile = '/tmp/mykey.key'