Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine the instructions to run the retriever example with qdrant #442

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions comps/retrievers/haystack/qdrant/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
# Retriever Microservice with Qdrant

# 🚀Start Microservice with Python
# 1. 🚀Start Microservice with Python (Option 1)

## Install Requirements
## 1.1 Install Requirements

```bash
pip install -r requirements.txt
```

## Start Qdrant Server
## 1.2 Start Qdrant Server

Please refer to this [readme](../../../vectorstores/langchain/qdrant/README.md).

## Setup Environment Variables
## 1.3 Setup Environment Variables

```bash
export http_proxy=${your_http_proxy}
export https_proxy=${your_https_proxy}
export QDRANT_HOST=${your_qdrant_host_ip}
export QDRANT_PORT=6333
export EMBED_DIMENSION=${your_embedding_dimension}
export INDEX_NAME=${your_index_name}
export TEI_EMBEDDING_ENDPOINT=${your_tei_endpoint}
```

## Start Retriever Service
## 1.4 Start Retriever Service

```bash
export TEI_EMBEDDING_ENDPOINT="http://${your_ip}:6060"
python haystack/qdrant/retriever_qdrant.py
```

# 🚀Start Microservice with Docker
# 2. 🚀Start Microservice with Docker (Option 2)

## Build Docker Image
## 2.1 Setup Environment Variables

```bash
export QDRANT_HOST=${your_qdrant_host_ip}
export QDRANT_PORT=6333
export TEI_EMBEDDING_ENDPOINT="http://${your_ip}:6060"
```

## 2.2 Build Docker Image

```bash
cd ../../
docker build -t opea/retriever-qdrant:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/haystack/qdrant/docker/Dockerfile .
```

## Run Docker with CLI
## 2.3 Run Docker with CLI

```bash
docker run -d --name="retriever-qdrant-server" -p 7000:7000 --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e TEI_EMBEDDING_ENDPOINT=${your_tei_endpoint} -e QDRANT_HOST=${your_qdrant_host_ip} -e QDRANT_PORT=${your_qdrant_port} opea/retriever-qdrant:latest
docker run -d --name="retriever-qdrant-server" -p 7000:7000 --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e TEI_EMBEDDING_ENDPOINT=$TEI_EMBEDDING_ENDPOINT -e QDRANT_HOST=$QDRANT_HOST -e QDRANT_PORT=$QDRANT_PORT opea/retriever-qdrant:latest
```

# 🚀3. Consume Retriever Service
Expand Down