Git Product home page Git Product logo

lsst-jupyter-kernel's Introduction

JupyterLab kernel configuration for the LSST science pipelines

Introduction

This repository contains a kernel specification for executing JupyterLab notebooks which use the the Rubin Observatory Legacy Survey of Space and Time (LSST) science pipelines.

Once deployed in the host where your JupyterLab notebook server executes (e.g. your laptop or a remote server such as the ones at CC-IN2P3, you will be able to launch notebooks which use a Python interpreter configured with all the packages specific to the LSST software distribution.

When you launch JupyterLab, you will see a screen similar to the one below:

Jupyter Launcher

Push the lsst_distrib button to launch a server already configured to use the LSST science pipelines.

Dependencies

This kernel specification requires that the LSST science pipelines are installed on the host where JupyterLab executes, under /cvmfs/sw.lsst.eu (see https://sw.lsst.eu for more information). The hosts at the CC-IN2P3 login farm are configured this way.

Installation

Execute the instructions below in the computer where you run JupyterLab (e.g. your laptop or a server in CC-IN2P3 login farm).

cd $HOME
git clone https://github.com/airnandez/lsst-jupyter-kernel.git
cd lsst-jupyter-kernel
bash ./install.sh
rm -r $HOME/lsst-jupyter-kernel

After a successful installation, you will find a directory located according to the operating system you deploy on, as follows:

Operating system Installation directory
Linux $HOME/.local/share/jupyter/kernels/lsst_distrib
macOS $HOME/Library/Jupyter/kernels/lsst_distrib

This directory is populated with files needed by JupyterLab to launch your notebook.

Customization

You can customize the Jupyter kernel specification installed in the previous step. In particular, you can specify the release of the pipelines you want to use for your notebooks. By default, the release used is the lastest weekly release of the lsst_distrib distribution available when your notebook is launched. If you need a specific fixed version, modify the file kernel.json in the installation directory (see above) by specifying which release you need.

For instance, if you want to use the release w_2020_10 on all your notebooks, modify the line:

"LSST_DISTRIB_RELEASE": "latest"

by the line:

"LSST_DISTRIB_RELEASE": "w_2020_10"

Credits

Author

This tool was developed and are maintained by Fabio Hernandez at IN2P3 / CNRS computing center (Lyon, France).

License

Copyright 2020 Fabio Hernandez

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.

lsst-jupyter-kernel's People

Contributors

airnandez avatar

Watchers

 avatar  avatar  avatar

lsst-jupyter-kernel's Issues

lsst_sims

Hi, is it possible to have a simular kernel for lsst_sims ?

Many thanks.

Sylvie

Kernel breaks to setup lsst_distrib environment installed via lsstinstall

This is the record of an issue found using this kernel with an installation of lsst_distrib made with lsstinstall (see announcement here).

The issue is that the script to load the LSST environment loadLSST.bash generated by lsstinstall accepts as a command line argument the name of the conda environment to activate. Here is the relevant line of loadLSST.bash:

...
export LSST_CONDA_ENV_NAME=${1:-${LSST_CONDA_ENV_NAME:-lsst-scipipe-0.7.0}}
...

When this script is called from another shell script, for instance:

#!/bin/bash

# This script expects some command line arguments arg1 arg2 arg3
...


cd /path/to/my/release
source loadLSST.bash
...

Since loadLSST.bash is sourced, it will receive and interpret the first command line argument (e.g. arg1 in the example above) passed to the caller script as if it was the name of the conda environment to activate. This feature makes this kernel break since it expects other arguments passed by Jupyter, which should not be passed to loadLSST.bash.

The fix is to save and consume all the arguments so that when loadLSST.bash is called there is no remaining arguments to the caller shell script. The saved arguments are restored afterwards and passed to the kernel launcher.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.