Installation

Installation

Environment Check

flowchart TD
    Start[Environment Setup] --> NetworkCheck{Network<br/>Connection?}
    NetworkCheck -->|Yes| DockerCheck1{Docker<br/>Support?}
    NetworkCheck -->|No| DockerCheck2{Docker<br/>Support?}
    DockerCheck1 -->|Yes| DockerPrebuilt[Docker<br/>Prebuilt]
    DockerCheck1 -->|No| PyPIInstall[PyPI<br/>Install]
    DockerCheck2 -->|Yes| DockerOffline[Docker<br/>Offline Deployment]
    DockerCheck2 -->|No| PackageDownload[Package<br/>Pre-download]

    %% Macaron color scheme
    style Start fill:#B0E0E6,stroke:#87CEEB,stroke-width:2px,color:#333
    style NetworkCheck fill:#E6E6FA,stroke:#DDA0DD,stroke-width:2px,color:#333
    style DockerCheck1 fill:#E6E6FA,stroke:#DDA0DD,stroke-width:2px,color:#333
    style DockerCheck2 fill:#E6E6FA,stroke:#DDA0DD,stroke-width:2px,color:#333
    style DockerPrebuilt fill:#B4E7CE,stroke:#98D8C8,stroke-width:2px,color:#333
    style PyPIInstall fill:#B4E7CE,stroke:#98D8C8,stroke-width:2px,color:#333
    style DockerOffline fill:#B4E7CE,stroke:#98D8C8,stroke-width:2px,color:#333
    style PackageDownload fill:#B4E7CE,stroke:#98D8C8,stroke-width:2px,color:#333

    %% Legend styles
    style Legend1 fill:#B0E0E6,stroke:#87CEEB,stroke-width:2px,color:#333
    style Legend2 fill:#E6E6FA,stroke:#DDA0DD,stroke-width:2px,color:#333
    style Legend3 fill:#B4E7CE,stroke:#98D8C8,stroke-width:2px,color:#333

Legend:

  • Light blue box: Flow start point
  • Light purple box: Decision nodes
  • Light green box: Action nodes

Choose Installation Method

Based on your environment conditions, please select the appropriate installation method:

Environments with Network Connection

  • Docker Prebuilt - Environments with Docker support (Recommended)

    • No local Python environment setup required
    • Fast deployment with high environment consistency
  • PyPI Install - Environments without Docker support

    • Direct installation to local Python environment
    • Supports multiple dependency group options
    • Recommended to use uv for installation

Environments without Network Connection

  • Docker Offline Deployment - Environments with Docker support

    • Build/pull image in network-connected environment first
    • Export and transfer to offline environment
  • Package Pre-download - Environments without Docker support

    • Pre-download all dependency packages
    • Transfer to offline environment for installation

Quick Start

Using Docker (Recommended)

Verify the Docker image is working correctly:

# Pull the latest version
docker pull ghcr.io/nics-dp/petsard:latest

# Verify installation
docker run --rm ghcr.io/nics-dp/petsard:latest python -c "
import petsard
print('✅ PETsARD installed successfully!')
"
  • Interactive Development
# Start interactive Python session
docker run -it --entrypoint /opt/venv/bin/python3 \
  -v $(pwd):/app/data \
  ghcr.io/nics-dp/petsard:latest

# Inside container, you can run:
# from petsard import Executor
# print('PETsARD is ready!')

Using PyPI Install

Verify local installation is successful:

# Install PETsARD (uv recommended, pip also works)
uv pip install petsard
# or
pip install petsard

# Verify installation
python -c "
import petsard
print('✅ PETsARD installed successfully!')
"

Next Steps

After verifying installation:

  1. Check the Getting Started guide for detailed usage examples
  2. Create a YAML configuration file to start using PETsARD
  3. Explore PETsARD YAML documentation to learn about configuration