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.11 or higher

  • Personal Access Token: For accessing GitLab repositories


Installation

VIPR Core + Reflectometry Plugin

# Create virtual environment
python3.11 -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

Required Variables

# Reflectorch storage directory (required for reflectometry plugin)
export REFLECTORCH_ROOT_DIR=${PWD}/storage/reflectorch

Optional Variables

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

# Celery broker settings (for vipr-framework)
export BROKER_HOST=redis
export BROKER_PORT=6379

# 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 registry components

# List available predictors
vipr registry 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/

Next Steps

  • Learn CLI commands: See CLI Reference

  • Explore components: Run vipr registry --help

  • Create custom configs: Check example configs in plugin repositories