Skip to content

Latest commit

 

History

History
84 lines (57 loc) · 2.21 KB

File metadata and controls

84 lines (57 loc) · 2.21 KB

Installation Guidelines

There are three ways to install SPU: using official Docker image, installing from PyPI, and building from source.

Environment

Linux

SPU has been tested with the following settings:

  • Ubuntu 22.04
  • Python 3.10 and 3.11

macOS

We have conducted some successful preliminary testings on macOS Monterey 14.1 with Apple Silicon.

Docker Image

Please check official Docker image.

Installing From PyPI

You could install SPU via the official PyPI package. Note that SPU current only support Python 3.10 and 3.11.

pip install spu

From Source

It is recommended to install in a virtual environment, e.g.,

conda create -n my-env python=3.11
conda activate my-env
pip install spu

Building From Source

uv venv --python 3.11
uv sync --group dev
uv pip install -e .
  • Note that:
    • This will build with Python 3.11 by default. See below for specifing Python version when building.
    • The Python version used for building (specified in bazelisk) must match the Python version used for pip install (can be checked using pip -V). It is recommended to install in a virtual environment.
  • Once GCC/bazel/python/Xcode version or other environment settings have changed, please run the following command to ensure a clean build
bazelisk clean --expunge

Build with GPU support

This requires CUDA Toolkit to be installed.

bazelisk build //spu:libspu -c opt --config=gpu
bazelisk build //spu:libpsi -c opt --config=gpu

uv build

Build with specified python version

uv venv --python 3.10 # specify version
uv sync --group dev

uv pip install -e .