본문으로 건너뛰기
SDK Version: 2.5.0

Installation

Step-by-step instructions for installing DX-ModelZoo and its dependencies on Linux systems.

Prerequisites​

Before installing DX-ModelZoo, ensure you have the following:

Windows Users

DX-ModelZoo runs on Windows via WSL2 (Windows Subsystem for Linux).

To install WSL2:

# Run in PowerShell (admin mode)
wsl --install

Then reboot and launch Ubuntu from the Start menu. See Microsoft's WSL documentation for details.

GPU Requirements (Optional)

For GPU inference:

  • NVIDIA GPU (Pascal/Turing/Ampere architecture)
  • NVIDIA Driver ≥ 535.230.02
  • CUDA 12.2
  • cuDNN 9.1

Installation Overview​

Required Steps

Optional Steps (choose as needed)

Required Installation​

Step 1: Install DeepX Components​

# Install DX-RT python package
pip install dx_engine-*.whl

# Install DX-Compiler python package
pip install dx_com-*.whl
NOTE

Refer to the official DX-RT and DX-Compiler installation guides for detailed setup instructions.

Step 2: Clone Repository​

git clone https://github.com/DEEPX-AI/dx-modelzoo.git
cd dx-modelzoo

Step 3: Basic Installation — choose CPU or GPU​

Pick exactly one ONNX Runtime backend. onnxruntime and onnxruntime-gpu must not be installed in the same environment (ONNX Runtime install guide).

# CPU inference
pip install -e ".[cpu]"
# GPU inference (CUDA) — see the CUDA note under Optional Installation
pip install -e ".[gpu]"

This installs the selected ONNX Runtime build and all core dependencies.

Switching between CPU and GPU

Remove the other distribution before switching, otherwise both remain installed and provider resolution becomes undefined:

# CPU -> GPU
pip uninstall -y onnxruntime && pip install -e ".[gpu]"

# GPU -> CPU
pip uninstall -y onnxruntime-gpu && pip install -e ".[cpu]"

Verify with pip list | grep onnxruntime — exactly one entry should remain.

Optional Installation​

Optional 1: GPU Inference (CUDA) environment setup​

CUDA Environment Setup

See GPU Requirements above for driver/CUDA/cuDNN versions.

After installing .[gpu], add NVIDIA library paths to LD_LIBRARY_PATH:

# Add to ~/.zshrc or ~/.bashrc
export LD_LIBRARY_PATH=$(python -c "import nvidia.cublas.lib; print(nvidia.cublas.lib.__path__[0])"):$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$(python -c "import nvidia.cudnn.lib; print(nvidia.cudnn.lib.__path__[0])"):$LD_LIBRARY_PATH

Optional 2: Development Environment​

pip install -e ".[dev]" # Includes pytest, ruff

Optional 3: Documentation Build​

Documentation build requires Python 3.9 or newer because the configured PDF plugin does not support Python 3.8.

pip install -e ".[docs]"
mkdocs serve -f docs/mkdocs.yml # Preview at http://localhost:8000

Build a static site and PDF from repository root:

mkdocs build -f docs/mkdocs.yml

The docs extra includes MkDocs, Material, mkdocstrings, the include-markdown plugin, and the PDF plugin configured in docs/mkdocs.yml.

Optional 4: Full Installation (cpu + dev + docs)​

pip install -e ".[all]"

This installs every optional extra at once.

Core Dependencies​

DX-ModelZoo keeps its core dependencies minimal:

pyyaml>=5.0
numpy>=1.20,<3.0
Pillow>=8.0
opencv-python>=4.5
python-dotenv>=0.19
tqdm>=4.60
loguru>=0.6
typer>=0.9
rich>=12.0
textual>=0.40
h5py
scipy
faster-coco-eval
open_clip_torch
transformers
pyclipper>=1.3.0.post6
shapely>=2.0.7
PyTorch stack is part of the core runtime

torch is a core dependency in pyproject.toml, and the source tree also relies on torchvision APIs for preprocessing/data loading paths. Do not treat PyTorch as an optional compile-only add-on.

Extras Summary​

ExtraPackagesPurpose
cpuonnxruntime>=1.15CPU-based ONNX inference
gpuonnxruntime-gpu>=1.17GPU-based ONNX inference
devpytest>=7.0, ruff>=0.1Testing & linting
docsmkdocs, mkdocs-material, mkdocstrings, mkdocs-include-markdown-plugin, mkdocs-to-pdfDocumentation build
allcpu + dev + docsEverything

Alternative Package Manager​

Using uv​

For faster dependency resolution, you can use uv instead of pip:

uv pip install -e ".[cpu]"
Dependency resolution is much faster with uv
pip install uv # Install uv
uv pip install -e ".[gpu]" # Fast installation