License Python Slurm Platform
Github Contributors Github Pull Requests Github Issues
Slurm Logo
Slurm HPC
⚑
Spack Logo
Spack Packages

Slurm Factory Documentation

Relocatable HPC cluster builder with optimized caching and portable packages

Get Started View on GitHub

Slurm Factory is a modern Python CLI tool built with Typer that automates the building of relocatable Slurm workload manager packages using LXD containers and the Spack package manager. It features a modular architecture with comprehensive exception handling, intelligent caching, and portable package generation for HPC environments.

Key Features

  • πŸ—οΈ Modern Architecture: Built with Typer CLI framework and modular Python design
  • πŸ“¦ Relocatable Packages: Runtime path configuration for cross-environment deployment
  • ⚑ Intelligent Caching: Multi-layer build caching for ultra-fast rebuilds
  • πŸ”§ Exception Handling: Comprehensive error management with custom exception hierarchy
  • πŸ§ͺ Tested: 100% test coverage with 112 passing tests using proper LXD mocking
  • πŸš€ GPU Support: CUDA-enabled builds for GPU-accelerated workloads

Quick Start

Installation

# Install from PyPI (recommended)
pip install slurm-factory

# Or install with pipx for isolation
pipx install slurm-factory

# Verify installation
slurm-factory --help

Prerequisites

# Install and configure LXD
sudo snap install lxd
sudo lxd init

Build Your First Relocatable Package

# Build latest Slurm with optimizations
slurm-factory build --slurm-version 25.05

# Build with GPU support
slurm-factory build --slurm-version 25.05 --gpu

# Build with custom configuration
slurm-factory build --slurm-version 25.05 --config-file custom.yaml

# Show available options
slurm-factory build --help

Deploy Anywhere

# Standard deployment
sudo mkdir -p /opt/slurm
sudo tar -xzf ~/.slurm-factory/builds/slurm-25.05-software.tar.gz -C /opt/slurm/
sudo tar -xzf ~/.slurm-factory/builds/slurm-25.05-module.tar.gz -C /usr/share/lmod/lmod/modulefiles/

# Load with default path
module load slurm/25.05

# Or deploy to custom location  
sudo tar -xzf ~/.slurm-factory/builds/slurm-25.05-software.tar.gz -C /shared/apps/
export SLURM_INSTALL_PREFIX=/shared/apps/software
module load slurm/25.05

Key Features

οΏ½ Relocatable Packages

Deploy the same package to any filesystem path using runtime environment variable overrides.

πŸ“¦ Portable Packages

Self-contained software and module packages that deploy anywhere with compatible architecture.

πŸ”§ Multiple Versions

Support for Slurm 25.05, 24.11, 24.05, 23.11, 23.02 with side-by-side installations.

⚑ Performance Optimized

CPU-specific optimizations with optional CUDA/GPU support for specialized workloads.

πŸ›  Modern Tech Stack

Python 3.11+ with UV package manager, LXD containers, and Spack integration.

πŸ“‹ Module Integration

Automatic Environment Modules/Lmod configuration for easy deployment management.

Use Cases

  • HPC Cluster Deployment: Standardized Slurm installations across heterogeneous clusters
  • Development Environments: Quick Slurm setup for testing and development
  • Multi-Version Support: Running different Slurm versions side-by-side
  • Performance Testing: Optimized builds for specific hardware configurations
  • Container Deployment: Portable packages for containerized HPC environments

Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   slurm-factory │───▢│ LXD Container│───▢│ Spack Build     β”‚
β”‚   CLI Tool      β”‚    β”‚ (Ubuntu 24.04)β”‚    β”‚ Environment     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                      β”‚
                                                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Target HPC      │◀───│ Portable     │◀───│ Optimized       β”‚
β”‚ Cluster         β”‚    β”‚ Packages     β”‚    β”‚ Slurm Build     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Package Information

Build Type Dependencies Size Build Time Use Case
CPU-only ~45 packages ~2-5GB ~35 min Production clusters
GPU-enabled ~180 packages ~15-25GB ~75 min GPU clusters

Documentation Structure

Latest Features

  • Multi-Version Support: Build and deploy Slurm versions 25.05, 24.11, 24.05, 23.11, 23.02
  • GPU Optimization: Optional CUDA support for GPU-enabled HPC clusters
  • Portable Packages: Self-contained deployments with module system integration
  • Modern Architecture: LXD containers with Spack package management
  • Performance Focused: CPU-optimized builds with minimal package sizes

Built with ❀️ by Vantage Compute