Installation¶
This page describes how to install Fujitsu One Compression (OneComp).
Requirements¶
- Python 3.12 or later (< 3.14)
- PyTorch (CPU or CUDA)
For Users (pip)¶
Step 1: Install PyTorch¶
Install the appropriate version of PyTorch for your system.
Check your CUDA version:
Verify PyTorch GPU support:
Step 2: Install OneComp¶
To enable visualization features (matplotlib), install with the visualize extra:
For Developers (uv -- recommended)¶
uv is a fast Python package and project manager written in Rust.
It provides deterministic, reproducible environments via its lockfile.
# Install uv (macOS or Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and set up
git clone https://github.com/FujitsuResearch/OneCompression.git
cd OneCompression
uv sync --extra cu128 --extra dev --extra visualize
The uv sync command creates a virtual environment and installs all dependencies (including torchvision from the same CUDA index as PyTorch).
Replace cu128 with the appropriate CUDA variant for your system: cpu, cu118, cu121, cu124, cu126, or cu128.
Adding --extra dev installs development tools (black, pytest, pylint).
Adding --extra visualize installs matplotlib for visualization features.
To use vLLM for serving quantized models, add --extra vllm:
Warning
Do not install vLLM with uv pip install vllm after uv sync. Packages installed via uv pip are not tracked by the lockfile and will be removed or overwritten by subsequent uv sync or uv run commands. Always use --extra vllm instead.
Running Commands¶
For Developers (pip)¶
git clone https://github.com/FujitsuResearch/OneCompression.git
cd OneCompression
# Install PyTorch with CUDA support
pip install torch --index-url https://download.pytorch.org/whl/cu128
# Install onecomp with development dependencies
pip install -e ".[dev]"
Building Documentation Locally¶
Then open http://127.0.0.1:8000 in your browser.