- Set up and activate your virtual environment:
python -m venv .venv
source .venv/bin/activate- Install python dependencies
pip install -r requirements.txtFor a GPU-oriented Linux deployment, install:
pip install -r requirements.gpu.txt- Copy
env.exampleto.envand configure params:- Set your
OPENAI_API_KEYfor LLM and TTS services - Set your env variables (you can follow the instructions in the
.env.examplefile) - Set
RIVERST_COMPUTE_DEVICE=cpuif you want to disable GPU/MPS usage at runtime
- Set your
Note: Not all API KEYS are strictly required. Only if you want to use a remote service, you need to expose the corresponding API KEY
Note: .env is gitignored for security
Note: Using OpenAI for all of the services with a free user plan will likely cause a Pipecat 500 issue shortly after generating a session as OpenAI rate limits free users to 3 requests per minute, which the initial setup of the models alone might exceed.
Note: The HuggingFace API key is not necessary for all models, but adding the key will allow access to models that might be gated behind permission requests or even your own private models. A Read token should allow this, but if you would like to use a more fine-grained access token for security reasons, then you should enable:
Make calls to Inference ProvidersunderInferenceRead access to contents of all public gated repos you can accessunderRepositories
- [Optional] If you want to use Google authentication (ENABLE_GOOGLE_AUTH is
true), you need to set it up:- Copy
authorization/authorized_users.json.exampletoauthorization/authorized_users.json - Add authorized user email addresses to the JSON array
- Copy
Note: authorization/authorized_users.json is gitignored for security
- [Optional] If you want to use local LLMs through
ollama(e.g.,qwen3), you need first to install ollama on your machine and then run
ollama pull <model_uri>For instance,
ollama pull qwen3:4b-instruct-2507-q4_K_M- Run the server:
python main.pydocker build --no-cache -t fastapi-server .
docker run -p 7860:7860 --env-file .env fastapi-serverTo build a GPU-oriented image instead:
docker build --no-cache --build-arg RIVERST_DEPLOYMENT_TARGET=gpu -t fastapi-server .
docker run --gpus all -p 7860:7860 --env-file .env fastapi-server