mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 23:12:56 +00:00
Make markdown files look prettier using prettier :)
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
OpenShift example
|
||||
=================
|
||||
# OpenShift example
|
||||
|
||||
This example provides templates for deploying the Jupyter Project docker-stacks images to OpenShift.
|
||||
|
||||
Prerequsites
|
||||
------------
|
||||
## Prerequsites
|
||||
|
||||
Any OpenShift 3 environment. The templates were tested with OpenShift 3.7. It is believed they should work with at least OpenShift 3.6 or later.
|
||||
|
||||
@@ -14,8 +12,7 @@ OpenShift Online, the public hosted version of OpenShift from Red Hat has a quot
|
||||
|
||||
If you want to experiment with using Jupyter Notebooks in an OpenShift environment, you should instead use [Minishift](https://www.openshift.org/minishift/). Minishift provides you the ability to run OpenShift in a virtual machine on your own local computer.
|
||||
|
||||
Loading the Templates
|
||||
---------------------
|
||||
## Loading the Templates
|
||||
|
||||
To load the templates, login to OpenShift from the command line and run:
|
||||
|
||||
@@ -27,8 +24,7 @@ This should create the `jupyter-notebook` template
|
||||
|
||||
The template can be used from the command line using the `oc new-app` command, or from the OpenShift web console by selecting _Add to Project_. This `README` is only going to explain deploying from the command line.
|
||||
|
||||
Deploying a Notebook
|
||||
--------------------
|
||||
## Deploying a Notebook
|
||||
|
||||
To deploy a notebook from the command line using the template, run:
|
||||
|
||||
@@ -89,8 +85,7 @@ https://notebook-jupyter.abcd.pro-us-east-1.openshiftapps.com/
|
||||
|
||||
When prompted, enter the password for the notebook.
|
||||
|
||||
Passing Template Parameters
|
||||
---------------------------
|
||||
## Passing Template Parameters
|
||||
|
||||
To override the name for the notebook, the image used, and the password, you can pass template parameters using the `--param` option.
|
||||
|
||||
@@ -103,19 +98,18 @@ oc new-app --template jupyter-notebook \
|
||||
|
||||
You can deploy any of the Jupyter Project docker-stacks images.
|
||||
|
||||
* jupyter/base-notebook
|
||||
* jupyter/r-notebook
|
||||
* jupyter/minimal-notebook
|
||||
* jupyter/scipy-notebook
|
||||
* jupyter/tensorflow-notebook
|
||||
* jupyter/datascience-notebook
|
||||
* jupyter/pyspark-notebook
|
||||
* jupyter/all-spark-notebook
|
||||
- jupyter/base-notebook
|
||||
- jupyter/r-notebook
|
||||
- jupyter/minimal-notebook
|
||||
- jupyter/scipy-notebook
|
||||
- jupyter/tensorflow-notebook
|
||||
- jupyter/datascience-notebook
|
||||
- jupyter/pyspark-notebook
|
||||
- jupyter/all-spark-notebook
|
||||
|
||||
If you don't care what version of the image is used, add the `:latest` tag at the end of the image name, otherwise use the hash corresponding to the image version you want to use.
|
||||
|
||||
Deleting the Notebook Instance
|
||||
------------------------------
|
||||
## Deleting the Notebook Instance
|
||||
|
||||
To delete the notebook instance, run `oc delete` using a label selector for the application name.
|
||||
|
||||
@@ -123,8 +117,7 @@ To delete the notebook instance, run `oc delete` using a label selector for the
|
||||
oc delete all,configmap --selector app=mynotebook
|
||||
```
|
||||
|
||||
Enabling Jupyter Lab Interface
|
||||
------------------------------
|
||||
## Enabling Jupyter Lab Interface
|
||||
|
||||
To enable the Jupyter Lab interface for a deployed notebook set the `JUPYTER_ENABLE_LAB` environment variable.
|
||||
|
||||
@@ -134,8 +127,7 @@ oc set env dc/mynotebook JUPYTER_ENABLE_LAB=true
|
||||
|
||||
Setting the environment variable will trigger a new deployment and the Jupyter Lab interface will be enabled.
|
||||
|
||||
Adding Persistent Storage
|
||||
-------------------------
|
||||
## Adding Persistent Storage
|
||||
|
||||
You can upload notebooks and other files using the web interface of the notebook. Any uploaded files or changes you make to them will be lost when the notebook instance is restarted. If you want to save your work, you need to add persistent storage to the notebook. To add persistent storage run:
|
||||
|
||||
@@ -152,8 +144,7 @@ When you have deleted the notebook instance, if using a persistent volume, you w
|
||||
oc delete pvc/mynotebook-data
|
||||
```
|
||||
|
||||
Customizing the Configuration
|
||||
-----------------------------
|
||||
## Customizing the Configuration
|
||||
|
||||
If you want to set any custom configuration for the notebook, you can edit the config map created by the template.
|
||||
|
||||
@@ -199,8 +190,7 @@ Start up the notebook again.
|
||||
oc scale dc/mynotebook --replicas 1
|
||||
```
|
||||
|
||||
Changing the Notebook Password
|
||||
------------------------------
|
||||
## Changing the Notebook Password
|
||||
|
||||
The password for the notebook is supplied as a template parameter, or if not supplied will be automatically generated by the template. It will be passed into the container through an environment variable.
|
||||
|
||||
@@ -214,8 +204,7 @@ This will trigger a new deployment so ensure you have downloaded any work if not
|
||||
|
||||
If using a persistent volume, you could instead setup a password in the file `/home/jovyan/.jupyter/jupyter_notebook_config.py` as per guidelines in <https://jupyter-notebook.readthedocs.io/en/stable/public_server.html>.
|
||||
|
||||
Deploying from a Custom Image
|
||||
-----------------------------
|
||||
## Deploying from a Custom Image
|
||||
|
||||
If you want to deploy a custom variant of the Jupyter Project docker-stacks images, you can replace the image name with that of your own. If the image is not stored on Docker Hub, but some other public image registry, prefix the name of the image with the image registry host details.
|
||||
|
||||
|
Reference in New Issue
Block a user