Git Product home page Git Product logo

ncar-python-tutorial's Introduction

https://circleci.com/gh/NCAR/ncar-python-tutorial/tree/master

NCAR Python Tutorial


Setup

This tutorial covers the installation and setup of a Python environment on:

  • Cheyenne
  • Casper
  • CGD's Hobart
  • Personal laptop/desktop with a UNIX-variant Operating System

NOTE: For windows users, setup scripts provided in this repository don't work on Windows machines for the time being. You may want to follow the instructions available here.

Step 1: Clone NCAR Python Tutorial Repository

Run the following commmand to clone this repo to your system(e.g. cheyenne, casper, your laptop, etc...):

git clone https://github.com/NCAR/ncar-python-tutorial.git

Step 2: Install Miniconda and Create Environments

  • Change directory to the cloned repository

    cd ncar-python-tutorial
  • Run the configure script:

    ./setup/configure

    This script does the following:

    • Install conda package manager if it is unable to find an existing installation. Otherwise, it will update the base environment
    • Create or Update python-tutorial conda environment.
    • Download data if not on Cheyenne or Casper or Hobart. If on Cheyenne or Casper or Hobart, create soft-links to an existing/local data repository.

NOTE: Be prepared for the script to take up to 15 minutes to complete.

$ ./setup/configure --help
usage: configure [-h] [--clobber] [--download]

Set up tutorial environment.

optional arguments:
  -h, --help      show this help message and exit
  --clobber, -c   Clobber existing environment
  --download, -d  Download tutorial data without setting environment up

Step 3: Close and re-open your current shell

For changes to take effect, close and re-open your current shell.

Step 4: Run the Setup Verification Script

  • Check that conda info runs successfully:

    conda info
  • From the ncar-python-tutorial directory, activate python-tutorial conda environment:

    conda activate python-tutorial
  • Run the setup verification script to confirm that everything is working as expected:

    cd ncar-python-tutorial
    ./setup/check_setup

    This step should print "Everything looks good!".


Launch Jupyter Lab

1. Cheyenne or DAV via JupyterHub (Recommended)

To use the Cheyenne or DAV compute nodes,we recommend using JupyterLab via NCAR's JupyterHub deployment.

Open your preferred browser (Chrome, Firefox, Safari, etc...) on your local machine, and head over to https://jupyterhub.ucar.edu/.

You will need to authenticate with either your yubikey or your DUO mobile app

2. Cheyenne or DAV via SSH Tunneling

In case you are having issues with jupyterhub.ucar.edu, we've provided utility scripts for launching JupyterLab on both Cheyenne and Casper via SSH Tunneling:

conda activate base
./setup/jlab/jlab-ch # on Cheyenne
./setup/jlab/jlab-dav # on Casper

3. Hobart via SSH Tunneling

For those interested in running JupyterLab on CGD's Hobart, you will need to use SSH tunneling script provided in setup/jlab/jlab-hobart

conda activate base
./setup/jlab/jlab-hobart
$ ./setup/jlab/jlab-hobart --help
Usage: launch dask
Possible options are:
 -w,--walltime: walltime [default: 08:00:00]
 -q,--queue: queue [default: medium]
 -d,--directory: notebook directory
 -p,--port: [default: 8888]

4. Personal Laptop

For those interested in running JupyterLab on their local machine, you can simply run the following command, and follow the printed instructions on the console:

conda activate base
jupyter lab

ncar-python-tutorial's People

Contributors

andersy005 avatar bonnland avatar dependabot[bot] avatar jukent avatar matt-long avatar mnlevy1981 avatar roberttomas avatar

Watchers

 avatar

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.