From 54fa3de2dac2f35c185b043be5b8c070af3e483e Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Mon, 27 Oct 2025 16:53:08 +0200 Subject: [PATCH] Fix ag-ui docker config --- examples/ag-ui-research/.env.example | 8 ++++---- examples/ag-ui-research/backend/Dockerfile | 13 +++++++++---- examples/ag-ui-research/docker-compose.yml | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/examples/ag-ui-research/.env.example b/examples/ag-ui-research/.env.example index 292ea271..71353d26 100644 --- a/examples/ag-ui-research/.env.example +++ b/examples/ag-ui-research/.env.example @@ -1,7 +1,7 @@ -# Path to the LanceDB database -# For Docker: /app/data/haiku_rag.lancedb -# For local development: Use absolute path to existing database -DB_PATH=~/SOME_FOLDER/haiku.rag.lancedb +# Path to the LanceDB database on your HOST machine +# This will be mounted into the Docker container at /app/data/haiku.rag.lancedb +# Must be an absolute path to an existing database created with haiku-rag +DB_PATH=/absolute/path/to/your/haiku.rag.lancedb # API keys (set as needed for your QA provider) # OPENAI_API_KEY=your-key-here diff --git a/examples/ag-ui-research/backend/Dockerfile b/examples/ag-ui-research/backend/Dockerfile index 10f55c6f..c6359b97 100644 --- a/examples/ag-ui-research/backend/Dockerfile +++ b/examples/ag-ui-research/backend/Dockerfile @@ -4,12 +4,17 @@ WORKDIR /app # Copy backend application files COPY agent.py main.py ./ -COPY pyproject.toml uv.lock ./ +COPY pyproject.toml ./ -# Install backend dependencies into the existing haiku.rag venv -RUN uv sync --frozen --no-dev +# Install backend dependencies +# Note: haiku-rag is already installed in the base image +RUN pip install --no-cache-dir \ + starlette>=0.45.2 \ + uvicorn[standard]>=0.34.2 \ + pydantic-ai-slim[ag-ui,openai]>=1.1.0 \ + python-dotenv>=1.0.1 EXPOSE 8000 # Run with uvicorn -CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] +CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] diff --git a/examples/ag-ui-research/docker-compose.yml b/examples/ag-ui-research/docker-compose.yml index 90bf8144..ff3941bc 100644 --- a/examples/ag-ui-research/docker-compose.yml +++ b/examples/ag-ui-research/docker-compose.yml @@ -14,7 +14,7 @@ services: - ./backend:/app - /app/.venv - ${DB_PATH}:/app/data/haiku.rag.lancedb - - ./haiku.rag.yaml:/app/haiku.rag.yaml:ro # Mount config file + - ./haiku.rag.yaml:/app/haiku.rag.yaml:ro networks: - ag-ui-network extra_hosts: