The module academic-ml provides pre-configured conda environments environments containing popular machine learning libraries and essential Python packages for data science workflows. Designed to support academic coursework on the SCC (Shared Computing Cluster), this module is equally suitable for research projects as it streamlines the setup of ML frameworks. The module is updated twice yearly before the Spring and Fall semesters to ensure access to the latest stable versions of included libraries and security patches.

A new version of the academic-ml module will be installed before the start of the Spring and Fall semesters so that the latest updates to the various libraries will be available.

Sections

 

Using the academic-ml Module

This module includes three conda environments based on PyTorch, Tensorflow, and Jax libraries. The GPU capabilities are automatically used when these environments are used on GPU-equipped compute nodes :

  • fall-2025-pyt  – PyTorch 2.8.0
  • fall-2025-tf  – Tensorflow 2.20.0
  • fall-2025-jax  – Jax 0.7.1

Aside from the core ML software and associated libraries, these environments are mostly identical, and a summary of the available software is provided. Each one provides development software such as Jupyter Notebooks, Spyder, the Nvidia CUDA SDK,  ML libraries like Transformers, and common Python libraries such as Numpy, Scipy, and Pandas. A complete list of every installed library with all versions is available by running the conda list command after activating the environments.

Using the environments

To use any of these environments, load the miniconda module, then the academic-ml module. First-time users of the miniconda module will prompted to run a setup script. See the miniconda documentation for more details:

module load miniconda
module load academic-ml/fall-2025
# see a summary of installed libraries:
module help academic-ml/fall-2025

Loading the academic-ml module in a terminal prints a message with instructions to activate these environments, and these commands are shown here:

# Activate the PyTorch environment:
conda activate fall-2025-pyt
# Or activate the Tensorflow environment:
conda activate fall-2025-tf
#Or activate the Jax-based environment run:
conda activate fall-2025-jax

When requesting a Jupyter Notebook, Jupyter Lab, or Spyder OnDemand session, enter the conda activation command in the Pre-Launch Command field. This screenshot shows an example of starting a Jupyter Notebook session with the fall-2025-tf environment.

OnDemand Notebook screenshot

Cached Model Files

The main ML libraries and popular libraries like Hugging Face will automatically download and cache model files and datasets. By default the cache location is in a user’s home directory, but this cache can quickly hit the home directory’s 10GB storage limit. Each library has its own particular means of setting the location of its cache directory, either using environment variables or using library function calls. The academic-ml/fall-2025 conda environments will automatically set the cache directory location for PyTorch, Tensorflow, Jax, and Hugging Face upon activation by setting the TORCH_HOME, TFHUB_DIR, JAX_COMPILATION_CACHE_DIR, and HF_HOME variables, respectively. The location will be in the same directory as conda environments, as configured in a user’s ~/.condarc file. The cache directory location can be printed out after activating one of the environments with the command echo $HF_HOME .

Customizing the academic-ml Module Environments

If you want to customize the conda environments, for example to add additional libraries for an academic course or for your own work, you will need to re-create one of these conda environment in your project’s /projectnb (or /restricted/projectnb) directory. Once the environment is recreated you can modify it as you like. There are two environment variables set when the module is loaded that provide the location of a .yml file for each of the two environments. These .yml files install exact clones of their environments:

  • $SCC_ACADEMIC_ML_YML_PYT – PyTorch .yml file
  • $SCC_ACADEMIC_ML_YML_TF – Tensorflow .yml file
  • $SCC_ACADEMIC_ML_YML_JAX – Jax.yml file

There are two additional environment variables with a simplified package list, generally adding capabilities like Jupyter and Spyder to the main machine learning library. These allow you to set up an environment for easier customization:

  • $SCC_ACADEMIC_ML_YML_BASIC_PYT – PyTorch .yml file
  • $SCC_ACADEMIC_ML_YML_BASIC_TF – Tensorflow .yml file
  • $SCC_ACADEMIC_ML_YML_BASIC_JAX – Jax.yml file

These are used to create your project’s copy of the environment.  As an example, let’s make a clone of one of the environments and add an additional library to it for use in a course.

module load miniconda
module load academic-ml/fall-2025
# make sure you are in the class /projectnb directory. 
cd /projectnb/course_number

# Change to the materials subdirectory
cd materials
# make a software subdirectory
mkdir software
cd software

# Make a clone of the fall-2025-pyt PyTorch-based environment. 
# This will use ~17GB of space.
conda env create -p ./class-custom-pyt -f  $SCC_ACADEMIC_ML_YML_PYT 
# Wait 45+ minutes...
conda activate  ./class-custom-pyt

# IMPORTANT: Run this script to set up the
# environment to automatically handle the model caching environment variables
# regardless of which .yml file 
$SCC_ACADEMIC_ML_DIR/scripts/install_model_cache_dir.sh

# Install the emoji library, for adding emojis to your Python print statements.
conda install emoji -c conda-forge
 
# In the future, to use your custom conda environment, use:
conda activate /projectnb/course_number/materials/software/class-custom-pyt  

Intel Extensions for PyTorch

The fall-2025-pyt environment includes the Intel Extensions for PyTorch library. This may improve the performance of PyTorch when running on CPU-only compute nodes, as might be done while developing or debugging codes, or for doing inference calculations. Intel provides extensive documentation on how to apply this library.

Here is a short example of running inference on a pre-trained model. The Intel Extensions for  PyTorch are automatically loaded and applied if there is no GPU available:

import torch
import torchvision.models as models

model = models.resnet50(weights='ResNet50_Weights.DEFAULT')
model.eval()
data = torch.rand(1, 3, 224, 224)

if not torch.cuda.is_available():
  # This will only load if a GPU is not available.
  # CPU-only, optimize for CPUs.
  import intel_extension_for_pytorch as ipex
  import os
  # Apply Intel optimizations
  model = ipex.optimize(model)
  # enable PyTorch multi-threading based on the number
  # of cores assigned to this job on the SCC
  torch.set_num_threads(int(os.environ.get('NSLOTS',1)))

with torch.no_grad():
  model(data)

print("Execution finished")

Back to top