You can also find the runnable code for this example on GitHub.
Setup
Object Storage
TensorZero uses object storage to store files (e.g. images, PDFs) used during multimodal inference. It supports any S3-compatible object storage service, including AWS S3, GCP Cloud Storage, Cloudflare R2, and many more. You can configure the object storage service in theobject_storage
section of the configuration file.
In this example, we’ll use a local deployment of MinIO, an open-source S3-compatible object storage service.
type = "filesystem"
) or disable file storage (type = "disabled"
).
See Configuration Reference for more details.
The TensorZero Gateway will attempt to retrieve credentials from the following resources in order of priority:
S3_ACCESS_KEY_ID
andS3_SECRET_ACCESS_KEY
environment variablesAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables- Credentials from the AWS SDK (default profile)
Docker Compose
We’ll use Docker Compose to deploy the TensorZero Gateway, ClickHouse, and MinIO.`docker-compose.yml`
`docker-compose.yml`