Adding Conda Kernels to JupyterLab on NAS Systems

Article ID: 711
Last updated: 17 Aug, 2026

When you work in JupyterLab, you may find it convenient to customize the JupyterLab interface by adding a conda environment to the list of available kernels. To accomplish this, complete the procedures described below.

Note: Some of the command lines below are too long to be formatted as one line, so they
are broken with a backslash (\).

Step 1: Activate the Conda Environment

  1. Launch an interactive job on a Cabeus compute node, such as mil_a100 or gh200:
    cfe01 % qsub -I -q gpu_devel -lselect=1:model=mil_a100:mem=64GB:ncpus=16:ngpus=1 \ 
    -l walltime=1:00:00
  2. Load the appropriate miniconda module:
    • On the A100 nodes:
      module use -a /swbuild/analytix/tools/modulefiles
      module load miniconda3/v4
      
    • On the Grace Hopper nodes:
      module use -a /swbuild/analytix/tools/modulefiles
      module load miniconda3/gh2
  3. View available conda environments:
    conda info –envs
  4. Activate the environment you want to add to the JupyterLab kernel list:
    source activate conda_environment
    
    where conda_environment is environment name (for example, mamba_ssm).

Step 2: Add the Conda Environment to Available Kernels in JupyterLab

  1. Register the conda environment with Jupyter:
    python -m ipykernel install --user --name=conda_environment \ 
    --display-name "Python (conda_environment)"
  2. Start JupyterLab using a Unix socket:
    jupyter lab --sock /tmp/user.sock --no-browser
  3. Open a new terminal and create an SSH tunnel from your local workstation:
    ssh -l username -o "StrictHostKeyChecking ask" \ 
    -L 8080:/tmp/user.sock -o ProxyJump=sfe,front_end compute_node 

    where username is your NAS user name; front_end is the front end system you submitted from (for example, pfe22); and compute_node is the actual node name (for example, r101i2n6).

  4. Access JupyterLab in your browser:
    Open http://localhost:8080
  5. Select your conda kernel in JupyterLab:
    In JupyterLab, open or create a notebook; navigate to Kernel > Change Kernel; and select your conda environment (for example, Python conda_environment).

Now you are all set to run JupyterLab with your custom conda environment.

Contact Us

General User Assistance

Security

  • Report security issues 24x7x365
  • Toll-free: 1-877-NASA-SEC (1-877-627-2732)
  • E-mail: soc@nasa.gov

User Documentation

High-End Computing Capability (HECC) Portfolio Office

NASA High-End Computing Program

Tell Us About It

Our goal is furnish all the information you need to efficiently and effectively use the HECC resources needed for your NASA computational projects.

We welcome your input on features and topics that you would like to see included on this website.

Please send us email with your wish list and other feedback.