TensorZero UI Deployment Guide
The TensorZero UI is a self-hosted web application that streamlines the use of TensorZero with features like observability and optimization. It’s easy to get started with the TensorZero UI.
Setup
To use the TensorZero UI, you only need your ClickHouse database URL (TENSORZERO_CLICKHOUSE_URL
) and TensorZero Gateway URL (TENSORZERO_GATEWAY_URL
).
Optionally, you can also provide credentials for fine-tuning APIs.
Credentials for Fine-tuning
The TensorZero UI integrates with model providers like OpenAI to streamline workflows like fine-tuning. To use these features, you need to provide credentials for the relevant model providers as environment variables. You don’t need to provide credentials if you’re not using the fine-tuning features for those providers.
The supported fine-tuning providers and their required credentials (environment variables) are:
Provider | Required Credentials |
---|---|
Fireworks AI | FIREWORKS_ACCOUNT_ID FIREWORKS_API_KEY |
OpenAI | OPENAI_API_KEY |
We’re planning to add support for more fine-tuning providers in the near future.
Deployment
The TensorZero UI is available on Docker Hub as tensorzero/ui
.
Running with Docker Compose (Recommended)
You can easily run the TensorZero UI using Docker Compose:
services: ui: image: tensorzero/ui # Mount your configuration folder (e.g. tensorzero.toml) to /app/config volumes: - ./config:/app/config:ro # Add your environment variables the .env file env_file: - ${ENV_FILE:-.env} # Publish the UI to port 4000 ports: - "4000:4000" restart: unless-stopped
For more details, see the example docker-compose.yml
file in the GitHub repository.
Running with Docker
Alternatively, you can launch the UI directly with the following command:
docker run \ --volume ./config:/app/config:ro \ --env OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ --publish 4000:4000 \ tensorzero/ui
Make sure to replace the TENSORZERO_CLICKHOUSE_URL
with the URL of your ClickHouse instance, and add any other API credentials as needed like we did above with OPENAI_API_KEY
.
Building from source
Alternatively, you can build the UI from source. See our GitHub repository for more details.