Installing Elyra AI
The Elyra JupyterLab extensions can be installed from PyPI, conda, or from source code.
- Prerequisites
- pip
- conda
- Build from source
- Verify Installation
- Docker
- Kubeflow Notebook Server
- Red Hat OpenShift
Prerequisites
JupyterLab dependencies:
- Elyra >= 2.0.0 requires JupyterLab 3.x
- Elyra < 2.0.0 requires JupyterLab 2.x
- Elyra == 0.10.x requires JupyterLab 1.x
The instructions below are installing the latest release.
pip
If you use pip
, install Elyra with:
pip3 install --upgrade elyra && jupyter lab build
If desired, you can install these Elyra extensions independently:
Pipeline Editor
pip3 install --upgrade elyra-pipeline-editor-extension && jupyter lab build
Code Snippets
pip3 install --upgrade elyra-code-snippet-extension && jupyter lab build
Python Editor
pip3 install --upgrade elyra-python-editor-extension && jupyter lab build
R Editor
pip3 install --upgrade elyra-r-editor-extension && jupyter lab build
conda
If you use conda
, install Elyra with:
conda install -c conda-forge elyra && jupyter lab build
or install the Pipeline editor, Code Snippet, or Script editor extensions individually:
conda install -c conda-forge elyra-pipeline-editor-extension && jupyter lab build
conda install -c conda-forge elyra-code-snippet-extension && jupyter lab build
conda install -c conda-forge elyra-python-editor-extension && jupyter lab build
conda install -c conda-forge elyra-r-editor-extension && jupyter lab build
Build from source
To build Elyra from source code follow the instructions in developer guide.
Verify Installation
To verify an Elyra installation review the installed server extensions and lab extensions.
Verify the server extensions
Verify that the elyra
extension is installed.
jupyter serverextension list
Should output:
config dir: /.../etc/jupyterjupyter_resource_usage enabled- Validating...jupyter_resource_usage OKjupyterlab enabled- Validating...jupyterlab [version] OKnbdime enabled- Validating...
jupyter server extension list
Should output:
Config dir: /.../.jupyterConfig dir: /.../etc/jupyterelyra enabled- Validating elyra...elyra [version] OKjupyter_lsp enabled- Validating jupyter_lsp...jupyter_lsp [version] OK
Verify the lab extensions
Verify that the elyra
labextensions are installed.
jupyter labextension list
Should output:
JupyterLab [version]/.../share/jupyter/labextensions@jupyter-server/resource-usage [version] enabled OK (python, jupyter-resource-usage)@krassowski/jupyterlab-lsp [version] enabled OK (python, jupyterlab_lsp)@jupyterlab/git [version] enabled OK (python, jupyterlab-git)Other labextensions (built into JupyterLab)app dir: /.../share/jupyter/lab@elyra/code-snippet-extension [version] enabled OK
Docker
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 versionx.y.z
installed.elyra/elyra:dev
is automatically re-built each time a change is committed to the master branch.
Pulling Elyra container images
Images can be pulled from Docker Hub
docker pull elyra/elyra:dev
or quay.io
docker pull quay.io/elyra/elyra:dev
Running Elyra container images
Invocation example 1:
Run the most recent Elyra development build in a Docker container. All changes are discarded when the Docker container is stopped.
docker run -it -p 8888:8888 elyra/elyra:3.0.1 jupyter lab --debug
Invocation example 2:
Run the most recent Elyra development build 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.
-v ${HOME}/jupyter-notebooks/:/home/jovyan/work\-w /home/jovyan/work\elyra/elyra:3.0.1 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.
-v ${HOME}/jupyter-notebooks/:/home/jovyan/work\-w /home/jovyan/work\-v ${HOME}/jupyter-data-dir:/home/jovyan/.local/share/jupyter\elyra/elyra:3.0.1 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.htmlOr copy and paste one of these URLs:http://4d17829ecd4c:8888/?token=d690bde267ec75d6f88c64a39825f8b05b919dd084451f82or http://127.0.0.1:8888/?token=d690bde267ec75d6f88c64a39825f8b05b919dd084451f82
Kubeflow Notebook Server
The instructions in this topic outline how to configure a Kubeflow Notebook Server for Elyra.
Red Hat OpenShift
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.