Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rucio/jupyterlab-extension

Rucio Jupyterlab plugin (GSOC Project)
https://github.com/rucio/jupyterlab-extension

Last synced: 16 days ago
JSON representation

Rucio Jupyterlab plugin (GSOC Project)

Awesome Lists containing this project

README

        

# Rucio JupyterLab Extension

[![Test](https://github.com/rucio/jupyterlab-extension/actions/workflows/test.yml/badge.svg)](https://github.com/rucio/jupyterlab-extension/actions/workflows/test.yml)
[![Build and Publish Extension](https://github.com/rucio/jupyterlab-extension/actions/workflows/build-and-publish-tagged.yml/badge.svg)](https://github.com/rucio/jupyterlab-extension/actions/workflows/build-and-publish-tagged.yml)

This is a JupyterLab extension that integrates with [Rucio - Scientific Data Management](https://github.com/rucio/rucio) to allow users to access some of Rucio's capabilities directly from the JupyterLab interface.

This extension is composed of a Python package named `rucio_jupyterlab`
for the server extension and a NPM package named `rucio-jupyterlab`
for the frontend extension.

## Requirements

* JupyterLab >= 3.0
* Rucio Server >= 1.28

## Install

You will need NodeJS to install the extension. For JupyterLab 4.x you will need NodeJS>=v20 and >=v14 for JupyterLab 3.x.

### JupyterLab 4.x

```bash
pip install rucio-jupyterlab
```

### JupyterLab 3.x

For JupyterLab 3.x, please use the last supported version.

```bash
pip install rucio-jupyterlab==0.10.0
```

#### Download mode

If you are going to run the extension in Download mode, you will also need to install libraries required by the RSE downloaders. For instance, `gfal2`, which is available in EPEL or conda-forge.

Additionally, you need to have `grid-proxy-init` or `voms-proxy-init` executable. You can do so by installing `voms-clients-java`.

```bash
$ apt install voms-clients-java
$ conda install -c conda-forge python-gfal2
# OR
$ yum install epel-release
$ yum install gfal2-all gfal2-python voms-clients-java
```

To be able to access the paths from within the notebook, you need to add the following snippet in your IPython configuration (e.g. `~/.ipython/profile_default/ipython_kernel_config.py`).

```python
c.IPKernelApp.extensions = ['rucio_jupyterlab.kernels.ipython']
```

More details in the [IPython Kernel configuration](CONFIGURATION.md#ipython-kernel)

Restart your JupyterLab instance afterwards to load the server extension.

## Configuration

See [CONFIGURATION.md](CONFIGURATION.md)

## Contributing

If you want to contribute or build the extension from source, see [CONTRIBUTING.md](CONTRIBUTING.md)

## Quick Setup using Docker

This repository comes with a Docker image of [jupyter/scipy-notebook](https://hub.docker.com/r/jupyter/scipy-notebook) installed with the extension.

To run the image, use the following command.

#### Replica Mode

```bash
$ docker run -d -p 8888:8888 \
-e RUCIO_MODE=replica \
-e RUCIO_WILDCARD_ENABLED= \
-e RUCIO_BASE_URL= \
-e RUCIO_AUTH_URL= \
-e RUCIO_DESTINATION_RSE= \
-e RUCIO_DISPLAY_NAME= \
-e RUCIO_NAME= \
-e RUCIO_SITE_NAME=ROAMING \
-e RUCIO_VO=def \
-e RUCIO_PATH_BEGINS_AT= \
-e RUCIO_RSE_MOUNT_PATH= \
-v : \
rucio/jupyterlab:latest
```

`` is a folder in the host that is mounted to a Rucio Storage Element via FUSE.
`` is a folder accessible from the notebook that is mounted to the host folder.

#### Download Mode

```bash
$ docker run -d -p 8888:8888 \
-e RUCIO_MODE=download \
-e RUCIO_WILDCARD_ENABLED= \
-e RUCIO_BASE_URL= \
-e RUCIO_AUTH_URL= \
-e RUCIO_DISPLAY_NAME= \
-e RUCIO_NAME= \
-e RUCIO_SITE_NAME=ROAMING \
-e RUCIO_VO=def \
-e RUCIO_VOMS_ENABLED= \
-e RUCIO_VOMS_VOMSES_PATH= \
-e RUCIO_VOMS_CERTDIR_PATH= \
-e RUCIO_VOMS_VOMSDIR_PATH= \
-e RUCIO_CA_CERT=/certs/rucio_ca.pem \
-v :/certs/rucio_ca.pem \
rucio/jupyterlab:latest
```

Follow the [configuration guide](CONFIGURATION.md) for details of the parameters.

## Troubleshoot

If you are seeing the frontend extension but it is not working, check
that the server extension is enabled:

```bash
jupyter serverextension list
```

If the server extension is installed and enabled but you are not seeing
the frontend, check the frontend is installed:

```bash
jupyter labextension list
```

If it is installed, try:

```bash
jupyter lab clean
jupyter lab build
```