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-reflectorch-plugin.git

Environment Setup

Optional Variables

# Reflectorch storage directory (defaults to ${PWD}/storage/reflectorch)
export REFLECTORCH_ROOT_DIR=${PWD}/storage/reflectorch

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

# Device selection (defaults to auto-detect)
export CUDA_VISIBLE_DEVICES=0

Tip: Add these to your ~/.bashrc or ~/.zshrc for permanent setup.


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/