Skip to content
Closed
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0898245
file_relationships table
dodekapod Nov 12, 2025
9581d52
Logic + smoke test
dodekapod Nov 26, 2025
d69f399
Reltest: wait longer for indexing
dodekapod Nov 26, 2025
ef9b641
Reltest: wait even longer for indexing
dodekapod Nov 26, 2025
a9e8afb
Move reated docs test to another workflow
dodekapod Dec 1, 2025
5475641
Wait for OpenRag to start
dodekapod Dec 1, 2025
f950a67
Set RAGMODE=SimpleRag, fix missing partition in the query
dodekapod Dec 1, 2025
c7b2ee3
Wait for llama-cpp server
dodekapod Dec 1, 2025
90b3c22
Rename related docs workflow
dodekapod Dec 1, 2025
7d60ec7
llamacpp: health_check -> health
dodekapod Dec 1, 2025
5609dd7
Let's debug
dodekapod Dec 1, 2025
058abab
Let's debug again
dodekapod Dec 2, 2025
2dbeae1
related_docs_test: --connect-timeout=600 seconds
dodekapod Dec 2, 2025
893150b
Set number of tokens to predict for llamacpp
dodekapod Dec 2, 2025
24806e9
Print response
dodekapod Dec 2, 2025
82aab47
Remove reranker, reduce memory usage (llamacpp)
dodekapod Dec 2, 2025
924ac0a
Print OpenRag log
dodekapod Dec 2, 2025
678eee9
More logs
dodekapod Dec 2, 2025
85a1708
Even more logs
dodekapod Dec 2, 2025
5cd7a45
llamacpp: disable prompt caching
dodekapod Dec 2, 2025
ab13cd2
llamacpp -> mockllm
dodekapod Dec 5, 2025
0d8925f
Don't wait for llamacpp
dodekapod Dec 5, 2025
cce33a3
Sleep after adding document
dodekapod Dec 5, 2025
0745970
Remove references to llamacpp
dodekapod Dec 5, 2025
10ebf65
Remove debug output
dodekapod Dec 5, 2025
b924816
Indexing / retrieval for Twake e-mail
dodekapod Dec 19, 2025
44991c3
Missing .env file
dodekapod Dec 19, 2025
174e612
Change test name
dodekapod Dec 19, 2025
3d41e2b
Set RETRIEVER_TYPE for test
dodekapod Dec 19, 2025
eb8fcf8
Use vllm
dodekapod Dec 19, 2025
e8f7b2e
More logs
dodekapod Dec 19, 2025
46aee49
Fix missprint
dodekapod Dec 19, 2025
e6e3e94
'doctype' is not required
dodekapod Jan 5, 2026
2de890e
email_test: wait for indexing
dodekapod Jan 6, 2026
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
102 changes: 102 additions & 0 deletions .github/workflows/email_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: E-mail test

on:
push:
workflow_dispatch:

jobs:
email-test:
runs-on: ubuntu-latest
steps:
- name: Update apt and install packages
run: |
df -h
echo ${PWD}
sudo apt update
sudo apt install -y curl git jq
sudo apt clean
sudo apt autoremove --purge -y

-
name: Set up Docker Compose
uses: docker/setup-compose-action@v1
with:
version: v2.34.0

-
name: Free up space and move Docker storage to /mnt
run: |
echo "Stopping Docker..."
sudo systemctl stop docker

echo "Creating new Docker root at /mnt/docker..."
sudo mkdir -p /mnt/docker
sudo rsync -aqxP /var/lib/docker/ /mnt/docker

echo "Updating Docker daemon config..."
echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json

cat /etc/docker/daemon.json

echo "Restarting Docker..."
sudo systemctl start docker

echo "Verifying Docker root directory:"
docker info | grep "Docker Root Dir"

-
name: Checkout current branch
uses: actions/checkout@v5
with:
submodules: true

-
name: Set up env
run: |
cp .github/workflows/email_test/.env ./
cp .github/workflows/email_test/*.yaml ./

-
name: Patch vllm to v0.9.2
run: sed -Ei 's/checkout v[0-9\.]+/checkout v0.9.2/' extern/vllm/Dockerfile.cpu

-
name: Build
run: docker compose --profile cpu build

-
name: Run
run: |
docker compose --profile cpu up -d || docker logs openrag-vllm-cpu-1
.github/workflows/smoke_test/wait_for_healthy.sh openrag-vllm-cpu-1

-
name: Cleanup
run: |
docker container prune -f
docker image prune -f
docker builder prune -f
df -h

-
name: List containers
run: docker container ls

-
name: Install Python venv
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install -r utility/requirements.txt

-
name: Wait for OpenRag to start
run: |
.github/workflows/related_docs_test/wait_for_services.sh

-
name: Execute test
run: |
.github/workflows/email_test/execute_test.sh emails


85 changes: 85 additions & 0 deletions .github/workflows/email_test/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# LLM
BASE_URL=http://mock-llm:8080/v1/
API_KEY=sk-
MODEL=mock-model
LLM_SEMAPHORE=10

# VLM
VLM_BASE_URL=http://mock-llm:8080/v1/
VLM_API_KEY=sk-
VLM_MODEL=mock-model
VLM_SEMAPHORE=10

# LLM for benchmark purpose, using LLM to judge the output
# You can use the same endpoint as the one used for OpenRAG
JUDGE_BASE_URL=
JUDGE_MODEL=
JUDGE_API_KEY=

# App
APP_PORT=8080 # this is the forwarded port
API_NUM_WORKERS=1 # Number of uvicorn workers for the FastAPI app
# ENABLE_RAY_SERVE=true # Use Ray Serve for the API instead of Uvicorn

RAGMODE=SimpleRag

# # VLLM
# VLLM_PORT=8000

# RETRIEVER
RETRIEVER_TYPE=email
CONTEXTUAL_RETRIEVAL=false
RETRIEVER_TOP_K=20 # Number of documents to return before reranking

# EMBEDDER
EMBEDDER_MODEL_NAME=Qwen/Qwen3-Embedding-0.6B
EMBEDDER_BASE_URL=http://vllm:8000/v1
EMBEDDER_API_KEY=EMPTY

# RERANKER
RERANKER_ENABLED=false
RERANKER_MODEL=Alibaba-NLP/gte-multilingual-reranker-base # or jinaai/jina-reranker-v2-base-multilingual or jinaai/jina-colbert-v2 if you want
RERANKER_TOP_K=20 # Number of documents to return after reranking. upgrade to 8 for better results if your llm has a wider context window

# Prompts
PROMPTS_DIR=../prompts/example1 # you ca

# Loaders
PDFLoader=MarkerLoader
XDG_CACHE_HOME=/app/model_weights
# If using MarkerLoader
MARKER_MAX_TASKS_PER_CHILD=100
MARKER_MAX_PROCESSES=1
MARKER_MIN_PROCESSES=1
# MARKER_POOL_SIZE=1 # Value au increment if you have a cluster of machines
MARKER_NUM_GPUS=0.01

# set to true if you want to deploy chainlit ui
WITH_CHAINLIT_UI=true

# Ray
RAY_DEDUP_LOGS=0
RAY_DASHBOARD_PORT=8265

RAY_NUM_GPUS=0.1
RAY_POOL_SIZE=1 # Number of serializer actor instances
RAY_MAX_TASKS_PER_WORKER=2 # Number of tasks per serializer instance
RAY_DASHBOARD_PORT=8265
RAY_ENABLE_RECORD_ACTOR_TASK_LOGGING=1
RAY_task_retry_delay_ms=3000
RAY_ENABLE_UV_RUN_RUNTIME_ENV=0
RAY_memory_monitor_refresh_ms=0

# SAVE UPLOADED FILES
SAVE_UPLOADED_FILES=true # usefull for chainlit source viewing


## Variables to add to activate indexer-ui
INDEXERUI_COMPOSE_FILE=extern/indexer-ui/docker-compose.yaml # Required path to the docker-compose file
INDEXERUI_PORT=8067 # Port to expose the Indexer UI (default is 3042)
INDEXERUI_URL='http://10.3.0.139:8067' # Base URL of the Indexer UI (required to prevent CORS issues)
VITE_API_BASE_URL='http://10.3.0.139:8080' # Base URL of your FastAPI backend. Used by the frondend
VITE_INCLUDE_CREDENTIALS=true

SUPER_ADMIN_MODE=true

144 changes: 144 additions & 0 deletions .github/workflows/email_test/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
include:
- vdb/milvus.yaml

x-openrag: &openrag_template
build:
context: .
dockerfile: Dockerfile
volumes:
- ${CONFIG_VOLUME:-./.hydra_config}:/app/.hydra_config # For dev mode
- ${DATA_VOLUME:-./data}:/app/data
- ${MODEL_WEIGHTS_VOLUME:-~/.cache/huggingface}:/app/model_weights # Model weights for RAG
- ./openrag:/app/openrag # For dev mode
- /$SHARED_ENV:/ray_mount/.env # Shared environment variables
- ./logs:/app/logs # For dev mode
ports:
- ${APP_PORT:-8080}:${APP_iPORT:-8080}
- ${RAY_DASHBOARD_PORT:-8265}:8265 # Disable when in cluster mode
networks:
default:
aliases:
- openrag
env_file:
- ${SHARED_ENV:-.env}
shm_size: 10.24gb

x-vllm: &vllm_template
networks:
default:
aliases:
- vllm
restart: on-failure
environment:
- HUGGING_FACE_HUB_TOKEN
ipc: "host"
volumes:
- ${VLLM_CACHE:-/root/.cache/huggingface}:/root/.cache/huggingface # put ./vllm_cache if you want to have the weights on the vllm_cache folder in your project
command: >
--model ${EMBEDDER_MODEL_NAME:-jinaai/jina-embeddings-v3}
--trust-remote-code
--task embed
--gpu_memory_utilization 0.3
--max-model-len ${MAX_MODEL_LEN:-8194}
# --max-num-seqs 1
# gpu_memory_utilization, max-num-seqs et max-model-len can be tuned depending on your GPU memory

healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 20s
timeout: 5s
retries: 4
start_period: 90s
# ports:
# - ${VLLM_PORT:-8000}:8000
services:
# GPU - default
openrag:
<<: *openrag_template
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
profiles:
- ""
depends_on:
rdb:
condition: service_started
milvus:
condition: service_healthy
vllm-gpu:
condition: service_healthy

# No GPU
openrag-cpu:
<<: *openrag_template
deploy: {}
profiles:
- "cpu"
depends_on:
rdb:
condition: service_started
milvus:
condition: service_healthy
# vllm-cpu:
# condition: service_healthy

rdb:
image: postgres:15
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-root_password}
- POSTGRES_USER=${POSTGRES_USER:-root}
volumes:
- ${DB_VOLUME:-./db}:/var/lib/postgresql/data
expose:
- 5432

vllm-gpu:
<<: *vllm_template
image: vllm/vllm-openai:v0.9.2
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
profiles:
- "" # Empty string gives default behavior (but does not run when cpu requested)

vllm-cpu:
<<: *vllm_template
build:
context: extern/vllm
dockerfile: Dockerfile.cpu
target: vllm-openai
image: openrag-vllm-openai-cpu
deploy: {}
environment:
- VLLM_CPU_KVCACHE_SPACE=8
# Default value isn't sufficient for full context length
command: >
--model ${EMBEDDER_MODEL_NAME:-jinaai/jina-embeddings-v3}
--trust-remote-code
--dtype float32
--max-model-len ${MAX_MODEL_LEN:-8194}
# dtype is required for aarch64 (https://github.com/vllm-project/vllm/issues/11327) and improves speed on amd64.
# max-num-batched-tokens is required for aarch64 because chunked prefill isn't supported by V1 vllm backend
# for aarch64 yet. On aarch64 max-num-batched-tokens must be equal max-model-len for now (without chunked prefill).
# For details see https://github.com/vllm-project/vllm/issues/21179
profiles:
- "cpu"

mock-llm:
build:
context: .github/workflows/related_docs_test/mock-llm
dockerfile: Dockerfile.mock-llm
ports:
- 8001:8080
profiles:
- 'cpu'

Loading
Loading