Giter VIP home page Giter VIP logo

jupyter-scikit-hep's Introduction

Archived

I've chosen to archive this project since my other project denv can achieve the goals of this project in a cleaner fashion.

Use the latest Python3 container image and install the most recent versions of jupyterlab and scikit-hep to get the dependencies I want.

denv init python:3
denv python3 -m pip install --user --upgrade jupyterlab scikit-hep
denv jupyter lab

Note: One could also use python's virtual environments within the denv in order to use different versions of packages with the same base python version.


jupyter-scikit-hep

Use a more recent version of Python with JupyterLab and other HEP-focused Python analysis tools.

Why?

CentOS7 is stuck on Python 3.6 and I want better Python (and all the improvements to the packages I use that come with that).

I've tried building a custom version of Python myself but that took a long time and did not work on the first pass. Using images can make my environment identical across different systems where I have my notebooks.

Usage

Putting these packages into the image also makes the image usable with runners that treat the image as read-only (e.g. apptainer and singularity).

docker or podman

The command below will download the image and then run it. Subsequent runs will keep using the already downloaded image, so to get updates you will need to use docker pull.

docker run \
  --rm -it \
  -p 8888:8888 \
  -v $(pwd -P):/home/jovyan \
  ghcr.io/tomeichlersmith/jupyter-scikit-hep

singularity or apptainer

Build the image from DockerHub into a local SIF image file.

apptainer build jupyter-scikit-hep.sif docker://ghcr.io/tomeichlersmith/jupyter-scikit-hep

Note: You may want to change APPTAINER_CACHEDIR so that apptainer doesn't fill up your home directory with layers.

Start JupyterLab from the container like normal defining your working directory as the home directory of the JupyterLab user jovyan.

apptainer run \
  --bind $(pwd -P):/home/jovyan \
  --bind ${TMPDIR:-/tmp/} \
  --home $(pwd -P) \
  --hostname jupyter-scikit-hep.$(uname -n) \
  --env "PS1=${PS1}" \
  jupyter-scikit-hep.sif

Packages

This is a very thin layer on top of the jupyter/scipy-notebook (documentation with packages included linked) that simply installs the scikit-hep metapackage. Just to list common packages that you may already use that are included: pandas, awkward, matplotlib, mplhep, hist, pylhe, h5py, scipy, sympy (and others - inspect links for details or give the notebook a try).

Additional Packages

Since your working directory is mounted to the home directory within the container, you can add more python packages by installing them as a "user". Open a terminal in Jupyter Lab and enter your pip install command.

pip install --user <extra-package>

Additionally, if you feel like this package would be helpful for the wider community, feel free to open an issue in this repository to include it (or see if it can be included in the scikit-hep metapackage).

Versions

Following CalVer with just the date as the format. Check the release notes for a specific tag to learn why that release was made and what packages are included.

jupyter-scikit-hep's People

Contributors

dependabot[bot] avatar tomeichlersmith avatar

Watchers

 avatar

jupyter-scikit-hep's Issues

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.