This guide explains how to run the Argilla server with Elasticsearch using
Launching Argilla and Elasticsearch with
For this method you first need to install Docker Compose.
Then, create a folder:
mkdir argilla && cd argilla
and launch the docker-contained web app with the following command:
wget -O docker-compose.yml https://raw.githubusercontent.com/argilla-io/argilla/main/docker-compose.yaml && docker-compose up -d
Latest versions of docker should be executed without the dash ‘-’, e.g:
docker compose up -d
This is a convenient way because it automatically includes an Elasticsearch instance, Argilla’s main persistent layer.
Keep in mind, if you execute
you will lose all your datasets in Argilla!
docker compose stop
By default, telemetry is enabled. This helps us to improve our product. For more info about the metrics and disabling them check telemetry.
Persisting ElasticSearch data#
To avoid losing all the data when the docker-compose/server goes down, you can add some persistence by mounting a volume in the docker compose.
To this end, modify the elasticsearch service and create a new volume in the docker-compse.yml file:
services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:8.5.3 container_name: elasticsearch environment: - node.name=elasticsearch - cluster.name=es-argilla-local - discovery.type=single-node - "ES_JAVA_OPTS=-Xms512m -Xmx512m" ulimits: memlock: soft: -1 hard: -1 networks: - argilla # Add the volume to the elasticsearch service volumes: - elasticdata:/usr/share/elasticsearch/data argilla: # ... here goes the rest of the docker-compose.yaml # ... # At the end of the file create a volume for ElasticSearch volumes: elasticdata:
Then, even if the ElasticSearch service goes down the data will be persisted in the elasticdata volume. To check it you can execute the command:
docker volume ls
Note that if you want to apply these changes, and you already have a previous docker-compose instance running, you need to execute the up command again:
docker-compose up -d