Local deployment
Describes how to run Opik locally using Docker Compose
To run Opik locally we recommend using Docker Compose. It’s easy to setup and allows you to get started in a couple of minutes but is not meant for production deployments. If you would like to run Opik in a production environment, we recommend using our Kubernetes Helm chart.
Before running the installation, make sure you have Docker and Docker Compose installed:
If you are using Mac or Windows, both docker
and docker compose
are included in the Docker
Desktop installation.
Installation
To install Opik, you will need to clone the Opik repository and run the docker-compose.yaml
file:
Opik will now be available at http://localhost:5173
In order to use the Opik Python SDK with your local Opik instance, you will need to run:
or in python:
This will create a ~/.opik.config
file that will store the URL of your local Opik instance.
All the data logged to the Opik platform will be stored in the ~/opik
directory, which means that you can start and stop the Opik platform without losing any data.
Starting, stopping
docker compose
commands should be run from the opik/deployment/docker-compose
directory.The docker compose up
command can be used to install, start and upgrade Opik:
To stop Opik, you can run:
Note: You can safely start and stop the Opik platform without losing any data.
Upgrading Opik
To upgrade Opik, you can run the following command:
Since the Docker Compose deployment is using mounted volumes, your data will not be lost when you upgrade Opik. You can also safely start and stop the Opik platform without losing any data.
Removing Opik
To remove Opik, you will need to remove the Opik containers and volumes:
Removing the volumes will delete all the data stored in the Opik platform and cannot be recovered. We do not recommend this option unless you are sure that you will not need any of the data stored in the Opik platform.
Advanced configuration
Running a specific version of Opik
You can run a specific version of Opik by setting the OPIK_VERSION
environment variable:
Building the Opik platform from source
You can also build the Opik platform from source by running the following command:
This will build the Frontend and Backend Docker images and start the Opik platform.