Spice.ai OSS Installation
Installation options for Spice.ai OSS
For deployment options, such as to Kubernetes, see Deployment
.
- macOS, Linux, and WSL
- Windows
Direct Download​
x86_x64 and ARM binaries for linux, Windows, and macOS are available for download from GitHub at github.com/spiceai/spiceai/releases.
Building Spice from Source​
Build prerequisites​
- macOS
- Linux (Ubuntu)
- If you don't already have it installed, install Homebrew:
# Note: Be sure to follow the steps in the Homebrew installation output to add Homebrew to your PATH.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install the Xcode Command Line tools
xcode-select --install
- Install dependencies
brew install rust
brew install go
brew install cmake
brew install protobuf
- Install system dependencies
sudo apt update
sudo apt install build-essential curl openssl libssl-dev pkg-config protobuf-compiler cmake
- Install Go
export GO_VERSION="1.22.4"
rm -rf /tmp/spice
mkdir -p /tmp/spice
cd /tmp/spice
wget https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz
tar xvfz go$GO_VERSION.linux-amd64.tar.gz
sudo mv ./go /usr/local/go
echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.profile
source $HOME/.profile
cd $HOME
rm -rf /tmp/spice
- Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y # install unattended
source $HOME/.cargo/env
Build Spice OSS​
# Clone SpiceAI OSS Repo
git clone https://github.com/spiceai/spiceai.git
cd spiceai
# Build and install OSS project in release mode
make install
# Build and install OSS project in dev mode
make install-dev
# Build and install OSS project with models
make install-with-models
# Also you can specify specific features
SPICED_CUSTOM_FEATURES="postgres sqlite" make install
# Run the following to temporarily add spice to your PATH.
# Add it to the end of your .bashrc or .zshrc to permanently add spice to your PATH.
export PATH="$PATH:$HOME/.spice/bin"
Build with Hardware Acceleration​
Spice OSS supports running both local language models and embedding models on dedicated hardware. This is for models from either Huggingface or models located locally.
Currently, neither CUDA nor metal have dedicated Dockerfiles or release binaries.
CUDA Support​
Steps:
- GPUs with Cuda compute capabilities < 7.5 are not supported (V100, Titan V, GTX 1000 series, ...).
- Ensure both Cuda and associated Nvidia drivers are installed. Requires CUDA version 12.2 or higher
- Ensure Nvidia binaries are in your path:
export PATH=$PATH:/usr/local/cuda/bin
- Build Spice OSS with CUDA support:
make install-with-models-cuda
This ensures CUDA devices are selected on model load, and CUDA-specifiy kernels used when possible.
Metal Support​
Steps:
- Ensure you have Xcode installed.
xcode-select --install
- Build Spice OSS with Metal support:
make install-with-models-metal
Similarily, this ensures Metal devices are selected on model load, and Metal-specific kernels used when possible.