<!-- {% comment %} Copyright 2018-2022 Elyra Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. {% endcomment %} -->
The Elyra JupyterLab extensions can be installed from PyPI, conda, or from source code.
JupyterLab dependencies:
The instructions below are installing the latest release.
Prior to version 3.1, the elyra
package included all dependencies. Subsequent releases allow for selective dependency installation:
elyra
- install the Elyra core featureselyra[all]
- install core features and all dependencieselyra[kfp-tekton]
- install the Elyra core features and support for Kubeflow Pipelines on Tektonelyra[gitlab]
- install the Elyra core features and GitLab support for Apache Airflow pipelineselyra[kfp-examples]
- install the Elyra core features and Kubeflow Pipelines custom component examplesIf you use pip
, install Elyra with:
pip3 install --upgrade elyra[all]
If desired, you can install these Elyra extensions independently:
pip3 install --upgrade elyra-pipeline-editor-extension
pip3 install --upgrade elyra-code-snippet-extension
pip3 install --upgrade elyra-code-viewer-extension
pip3 install --upgrade elyra-python-editor-extension
pip3 install --upgrade elyra-r-editor-extension
If you use conda
, install Elyra with:
conda install -c conda-forge elyra[all]
NOTE:
The Elyra packaging process was changed in version 3.1.0. The Kubeflow Pipelines on Tekton dependency is no longer installed by default. To install this dependency, you must specify elyra[all]
or elyra[kfp-tekton]
.
You can also install the Pipeline editor, Code Snippet, Code Viewer, or Script editor extensions individually:
conda install -c conda-forge elyra-pipeline-editor-extension
conda install -c conda-forge elyra-code-snippet-extension
conda install -c conda-forge elyra-code-viewer-extension
conda install -c conda-forge elyra-python-editor-extension
conda install -c conda-forge elyra-r-editor-extension
NOTE: The R Editor extension is not yet available on conda-forge
or pip
package manager.
To build Elyra from source code follow the instructions in developer guide.
To verify an Elyra installation review the installed server extensions and lab extensions.
Verify that the elyra
extension is installed.
jupyter server extension list
Should output:
Config dir: /.../.jupyter
Config dir: /.../etc/jupyter
elyra enabled
- Validating elyra...
elyra OK
jupyter_lsp enabled
- Validating jupyter_lsp...
jupyter_lsp [version] OK
jupyter_resource_usage enabled
- Validating jupyter_resource_usage...
jupyter_resource_usage [version] OK
jupyter_server_mathjax enabled
- Validating jupyter_server_mathjax...
jupyter_server_mathjax OK
jupyterlab enabled
- Validating jupyterlab...
jupyterlab [version] OK
jupyterlab_git enabled
- Validating jupyterlab_git...
jupyterlab_git [version] OK
nbclassic enabled
- Validating nbclassic...
nbclassic OK
nbdime enabled
- Validating nbdime...
nbdime [version] OK
Config dir: /.../etc/jupyter
NOTE: If you don't see the Elyra server extension enabled, you may need to explicitly enable it with jupyter server extension enable elyra
.
Verify that the elyra
labextensions are installed.
jupyter labextension list
Should output:
JupyterLab [version]
/.../share/jupyter/labextensions
nbdime-jupyterlab [version] enabled OK
@jupyter-server/resource-usage [version] enabled OK (python, jupyter-resource-usage)
@krassowski/jupyterlab-lsp [version] enabled OK (python, jupyterlab_lsp)
@elyra/code-snippet-extension [version] enabled OK
@elyra/code-viewer-extension [version] enabled OK
@elyra/metadata-extension [version] enabled OK
@elyra/pipeline-editor-extension [version] enabled OK
@elyra/python-editor-extension [version] enabled OK
@elyra/r-editor-extension [version] enabled OK
@elyra/theme-extension [version] enabled OK
@jupyterlab/git [version] enabled OK (python, jupyterlab-git)
Other labextensions (built into JupyterLab)
app dir: /.../share/jupyter/lab
If you have Docker installed, you can use JupyterLab and Elyra by running one of the ready-to-run container images:
elyra/elyra:latest
has the latest released version installed.elyra/elyra:x.y.z
has version x.y.z
installed.elyra/elyra:dev
is automatically re-built each time a change is committed to the master branch.Images can be pulled from Docker Hub
docker pull elyra/elyra:dev
or quay.io
docker pull quay.io/elyra/elyra:dev
Invocation example 1: Run Elyra v3.4.0 in a Docker container. All changes are discarded when the Docker container is stopped.
docker run -it -p 8888:8888 elyra/elyra:3.4.0 jupyter lab --debug
Invocation example 2: Run Elyra v3.4.0 in a Docker container and mount the existing local $HOME/jupyter-notebooks/
directory as JupyterLab work directory. This enables you to make existing notebooks and other files available in the Docker container. Only files in this working directory are retained when the Docker container is stopped.
docker run -it -p 8888:8888\
-v ${HOME}/jupyter-notebooks/:/home/jovyan/work\
-w /home/jovyan/work\
elyra/elyra:3.4.0 jupyter lab --debug
Invocation example 3: Same as above. In addition a local directory named ${HOME}/jupyter-data-dir
is mounted as the Jupyter data directory in the Docker container, storing all user-defined Elyra metadata artifacts you might create, such as code snippets, runtime configurations, or runtime images.
Note: To start with a clean environment ${HOME}/jupyter-data-dir
should refer to an empty directory. To re-use an existing Jupyter data directory from a local installation specify the output of jupyter --data-dir
as directory name.
docker run -it -p 8888:8888\
-v ${HOME}/jupyter-notebooks/:/home/jovyan/work\
-w /home/jovyan/work\
-v ${HOME}/jupyter-data-dir:/home/jovyan/.local/share/jupyter\
elyra/elyra:3.4.0 jupyter lab --debug
Open the displayed URL in your browser to start using JupyterLab and Elyra.
To access the notebook, open this file in a browser:
file:///home/jovyan/.local/share/jupyter/runtime/nbserver-6-open.html
Or copy and paste one of these URLs:
http://4d17829ecd4c:8888/?token=d690bde267ec75d6f88c64a39825f8b05b919dd084451f82
or http://127.0.0.1:8888/?token=d690bde267ec75d6f88c64a39825f8b05b919dd084451f82
The instructions in this topic outline how to configure a Kubeflow Notebook Server for Elyra.
JupyterLab and Elyra are included in the Open Data Hub community operator. Follow the instructions in this document to deploy the operator in a Red Hat OpenShift cluster.