Create a Custom Jupyter Image
This guide tells you how to configure a custom Docker image for your Jupyternotebook server in Kubeflow.
Follow these steps to configure the launch command (CMD
) in your Docker image:
- Set the working directory:
- Allow Jupyter to listen on all IP addresses:
- Set the port:
--port=8888
- Disable authentication. (Kubeflow takes care of authentication based onthe type of authentication selected during deployment of Kubeflow. Afterauthentication to Kubeflow, users can access all Kubeflow componentsfrom the UI, including notebooks.)
Use the following setting to allow passwordless access to your Jupyternotebook servers:
- Allow any origin to access your Jupyter notebook server:
- Set the base URL. The Kubeflow notebook controller manages the base URL forthe notebook server using the environment variable called . YourDocker image should define the variable and set the value of
base_url
asfollows:
ENV NB_PREFIX /
CMD ["sh","-c", "jupyter notebook --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"]
When starting a Jupyter notebook server from theKubeflow UI, specify your custom Docker image. See the guide to setting upyour Jupyter notebooks.