Code Monkey home page Code Monkey logo

ipython_kernel_nersc's Introduction

IPYTHON NERSC KERNEL

The package

Create custom IPython kernels for using jupyter notebooks at NERSC.

Why would you need this script?

When you try to connect to jupyter-dev, it will read your JUPYTER_PATH. If for some reasons, there are packages in your path in conflict with the default paths of jupyter-dev, you will not be able to connect. If you encounter such problem, here is a solution:

  • Edit your .bashrc.ext (or whatever file where you declare your paths) and reorganise it the following:
export NERSC_HOST=`/usr/common/usg/bin/nersc_host`
if [ ${NERSC_HOST} == "cori19" ]; then
    export NERSC_HOST="toto"
fi

if [ ${NERSC_HOST} == "cori" ]; then
    <all your declarations and module loads>
fi
  • By doing so, if you connect to jupyter-dev (cori19), you won't load all your custom packages. However, if you connect to cori, you will load everything as usual.
  • Then on cori, run the script makekernel.py and create a kernel with all your custom paths:
python makekernel.py -kernelname mykernel -py_version 2.7

or

python makekernel.py -kernelname mykernel -py_version 3.6
  • It will set the $LD_LIBRARY_PATH, $PYTHONPATH, and $PATH. You can choose python2.7 or python3.6 (latest anaconda-4.4).
  • Connect to https://jupyter-dev.nersc.gov/hub/login and create a notebook with the kernel mykernel${py_version} you just created (which contains all your favourite paths).

Other usage

It is easy to modify the script to generate any kind of custom kernels. Feel free to edit it!

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.