VIPR Framework - CLI Installation

This guide covers installing VIPR Core and plugins for command-line usage.

Table of Contents

  1. Prerequisites

  2. Installation

  3. Environment Setup

  4. Verify Installation

  5. Quick Start Example


Prerequisites

  • Python: 3.10 or higher


Installation

VIPR Core + Reflectometry Plugin

# Create virtual environment
python3.10 -m venv myenv
source myenv/bin/activate

# Install VIPR Core
pip install git+https://codebase.helmholtz.cloud/vipr/vipr-core.git

# Install Reflectometry Plugin
pip install git+https://codebase.helmholtz.cloud/vipr/vipr-reflectometry-plugin.git

Environment Setup

Common Variables

# Shared reflectometry model root
export REFLECTOMETRY_ROOT_DIR=${PWD}/storage/reflectometry

# HuggingFace cache directory
export HF_HOME=${PWD}/storage/huggingface_cache

REFLECTOMETRY_ROOT_DIR is the shared root used by reflectometry model families such as reflectorch, flow_models, and panpe.

Tip: Add these to your ~/.bashrc or ~/.zshrc for permanent setup if you use reflectometry workflows regularly.


Verify Installation

Check VIPR Version

vipr --version

List Installed Plugins

vipr plugins list

Expected output should include:

  • reflectometry (if installed)

  • Other installed plugins

Test Registry

# List all registered components
vipr discovery components

# List available predictors
vipr discovery predictors

Quick Start Example

Run Example Prediction

Prediction for PTCDI-C3 (config from reflectorch examples):

vipr --config @vipr_reflectometry/reflectorch/examples/configs/PTCDI-C3.yaml inference run

Test with Custom Config

# Using relative path (from current working directory)
vipr --config ./my-config.yaml inference run

# Using absolute path
vipr --config /path/to/config.yaml inference run

Note: To use your own experimental data file, set the data_path value in the load_data section to the relative path of your data file (relative to PWD).

Check Results

# Results are typically stored in the storage directory
ls storage/results/