Weaviate is an open-source vector database designed for storing, searching, and retrieving high-dimensional data efficiently. It is particularly useful for applications involving AI, machine learning, natural language processing (NLP), and semantic search.
This tutorial explains how to install Weaviate inside a Docker container on Linux. Commands have been tested on Ubuntu.
Prepare environment
Make sure you have installed Docker in your system. If you are using Ubuntu, installation instructions can be found in the post.
Install Weaviate
- Host network
Run the following command to create a container for Weaviate that uses host network:
docker run -d --name=weaviate --restart=always --network=host \
-v /opt/weaviate/data:/var/lib/weaviate \
-e PERSISTENCE_DATA_PATH=/var/lib/weaviate \
semitechnologies/weaviate
- User-defined bridge network
User-defined bridge network can be used for listening on different port. By default, the Weaviate service listens on port 8080 for the REST API and port 50051 for gRPC. These ports can be changed with -p
option.
docker network create app-net
docker run -d --name=weaviate --restart=always --network=app-net \
-p 8081:8080 \
-p 8082:50051 \
-v /opt/weaviate/data:/var/lib/weaviate \
-e PERSISTENCE_DATA_PATH=/var/lib/weaviate \
semitechnologies/weaviate
Testing Weaviate
Send a GET request to check the accessibility of the Chroma service and retrieve its metadata:
curl http://<IP_ADDRESS>:8080/v1/meta
Note: Replace <IP_ADDRESS>
with the actual IP address of the system.
Uninstall Weaviate
To completely remove Weaviate, remove its container:
docker rm --force weaviate
Remove Weaviate image:
docker rmi semitechnologies/weaviate
You can also remove Weaviate data:
sudo rm -rf /opt/weaviate
If a user-defined bridge network was created, you can delete it as follows:
docker network rm app-net
Leave a Comment
Cancel reply