docs/deployment/tensorzero-ui.mdx
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.
Deploy the TensorZero Gateway and configure TENSORZERO_GATEWAY_URL.
For example, if the gateway is running locally, you can set TENSORZERO_GATEWAY_URL=http://localhost:3000.
The TensorZero UI is available on Docker Hub as tensorzero/ui.
You can easily run the TensorZero UI using Docker Compose:
services:
ui:
image: tensorzero/ui
# Add your environment variables the .env file (make sure it contains `TENSORZERO_GATEWAY_URL`)
env_file:
- ${ENV_FILE:-.env}
# Publish the UI to port 4000
ports:
- "4000:4000"
restart: unless-stopped
Make sure to create a .env file with the relevant environment variables.
For more details, see the example docker-compose.yml file in the GitHub repository.
Alternatively, you can launch the UI directly with the following command:
docker run \
--volume ./config:/app/config:ro \
--env-file ./.env \
--publish 4000:4000 \
tensorzero/ui
Make sure to create a .env file with the relevant environment variables.
We provide a reference Helm chart in our GitHub repository. You can use it to run TensorZero in Kubernetes.
The chart is available on ArtifactHub.
</Accordion> <Accordion title="Building from source">Alternatively, you can build the UI from source. See our GitHub repository for more details.
</Accordion> </AccordionGroup> </Step> </Steps>The TensorZero UI exposes an endpoint for health checks.
This /health endpoint checks that the UI is running, the associated configuration is valid, and the gateway connection is healthy.
The TensorZero UI supports the following optional environment variables.
For certain uncommon scenarios (e.g. IPv6), you can also customize HOST inside the UI container.
See the Vite documentation for more details.
Set the environment variable TENSORZERO_UI_LOG_LEVEL to control log verbosity.
The allowed values are debug, info (default), warn, and error.