Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Goal: Containerize Python SDK scripts for automated logging and cronjobs using Docker. Features: Python SDK, Docker containerization, environment variables for API key configuration.

Configuration Steps

Step 1: Create Dockerfile

Use a minimal Python base image and install the Braintrust SDK.

Step 2: Set API key at runtime

Pass your Braintrust API key as an environment variable when running the container.

Step 3: Add dependencies

If your script requires additional packages, add a requirements.txt file.

Notes

  • Braintrust does not publish an official Docker image
  • Python 3.10+ is required
  • Use standard Docker best practices for production deployments