genai-stack Documentation

Langchain + Docker + Neo4j + Ollama

5,301 stars Python Python 1 file ยท ~6,877 tokens
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy genai-stack on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name genai-stack -p 7687:7687 --restart always ollama/ollama:latest
Configured Services & Ports
โš™๏ธ llm
image: ollama/ollama:latest
โš™๏ธ llm-gpu
image: ollama/ollama:latest
โš™๏ธ pull-model
image: genai-stack/pull-model:latest
โš™๏ธ database
image: neo4j:5.26
๐Ÿ”Œ Ports: 7687:7687, 7474:7474
โš™๏ธ loader
image: build locally
๐Ÿ”Œ Ports: 8081:8080, 8502:8502
โš™๏ธ bot
image: build locally
๐Ÿ”Œ Ports: 8501:8501
โš™๏ธ pdf_bot
image: build locally
๐Ÿ”Œ Ports: 8503:8503
โš™๏ธ api
image: build locally
๐Ÿ”Œ Ports: 8504:8504
โš™๏ธ front-end
image: build locally
๐Ÿ”Œ Ports: 8505:8505
docker-compose.yml
yaml (docker-compose.yml)
services:

  llm: &llm
    image: ollama/ollama:latest
    profiles: ["linux"]
    networks:
      - net

  llm-gpu:
    <<: *llm
    profiles: ["linux-gpu"]
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

  pull-model:
    image: genai-stack/pull-model:latest
    build:
      context: .
      dockerfile: pull_model.Dockerfile
    environment:
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
      - LLM=${LLM-llama2}
    networks:
      - net
    tty: true

  database:
    user: neo4j:neo4j
    image: neo4j:5.26
    ports:
      - 7687:7687
      - 7474:7474
    volumes:
      - $PWD/data:/data
    environment:
      - NEO4J_AUTH=${NEO4J_USERNAME-neo4j}/${NEO4J_PASSWORD-password}
      - NEO4J_PLUGINS=["apoc"]
      - NEO4J_db_tx__log_rotation_retention__policy=false
      - NEO4J_dbms_security_procedures_unrestricted=apoc.*
    healthcheck:
        test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1"]
        interval: 15s
        timeout: 30s
        retries: 10
    networks:
      - net

  loader:
    build:
      context: .
      dockerfile: loader.Dockerfile
    volumes:
      - $PWD/embedding_model:/embedding_model
    environment:
      - NEO4J_URI=${NEO4J_URI-neo4j://database:7687}
      - NEO4J_PASSWORD=${NEO4J_PASSWORD-password}
      - NEO4J_USERNAME=${NEO4J_USERNAME-neo4j}
      - OPENAI_API_KEY=${OPENAI_API_KEY-}
      - GOOGLE_API_KEY=${GOOGLE_API_KEY-}      
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
      - EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
      - LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
      - LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
      - LANGCHAIN_PROJECT=${LANGCHAIN_PROJECT}
      - LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY}
      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
      - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
    networks:
      - net
    depends_on:
      database:
        condition: service_healthy
      pull-model:
        condition: service_completed_successfully
    x-develop:
      watch:
        - action: rebuild
          path: .
          ignore:
            - bot.py
            - pdf_bot.py
            - api.py
            - front-end/
    ports:
      - 8081:8080
      - 8502:8502


  bot:
    build:
      context: .
      dockerfile: bot.Dockerfile
    volumes:
      - $PWD/embedding_model:/embedding_model
    environment:
      - NEO4J_URI=${NEO4J_URI-neo4j://database:7687}
      - NEO4J_PASSWORD=${NEO4J_PASSWORD-password}
      - NEO4J_USERNAME=${NEO4J_USERNAME-neo4j}
      - OPENAI_API_KEY=${OPENAI_API_KEY-}      
      - GOOGLE_API_KEY=${GOOGLE_API_KEY-}
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
      - LLM=${LLM-llama2}
      - EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
      - LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
      - LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
      - LANGCHAIN_PROJECT=${LANGCHAIN_PROJECT}
      - LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY}
      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
      - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
    networks:
      - net
    depends_on:
      database:
        condition: service_healthy
      pull-model:
        condition: service_completed_successfully
    x-develop:
      watch:
        - action: rebuild
          path: .
          ignore:
            - loader.py
            - pdf_bot.py
            - api.py
            - front-end/
    ports:
      - 8501:8501

  pdf_bot:
    build:
      context: .
      dockerfile: pdf_bot.Dockerfile
    environment:
      - NEO4J_URI=${NEO4J_URI-neo4j://database:7687}
      - NEO4J_PASSWORD=${NEO4J_PASSWORD-password}
      - NEO4J_USERNAME=${NEO4J_USERNAME-neo4j}
      - OPENAI_API_KEY=${OPENAI_API_KEY-}
      - GOOGLE_API_KEY=${GOOGLE_API_KEY-}
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
      - LLM=${LLM-llama2}
      - EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
      - LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
      - LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
      - LANGCHAIN_PROJECT=${LANGCHAIN_PROJECT}
      - LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY}
      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
      - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
    networks:
      - net
    depends_on:
      database:
        condition: service_healthy
      pull-model:
        condition: service_completed_successfully
    x-develop:
      watch:
        - action: rebuild
          path: .
          ignore:
            - loader.py
            - bot.py
            - api.py
            - front-end/
    ports:
      - 8503:8503

  api:
    build:
      context: .
      dockerfile: api.Dockerfile
    volumes:
      - $PWD/embedding_model:/embedding_model
    environment:
      - NEO4J_URI=${NEO4J_URI-neo4j://database:7687}
      - NEO4J_PASSWORD=${NEO4J_PASSWORD-password}
      - NEO4J_USERNAME=${NEO4J_USERNAME-neo4j}
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - GOOGLE_API_KEY=${GOOGLE_API_KEY}  
      - OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
      - LLM=${LLM-llama2}
      - EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
      - LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
      - LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
      - LANGCHAIN_PROJECT=${LANGCHAIN_PROJECT}
      - LANGCHAIN_API_KEY=${LANGCHAIN_API_KEY}
      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
      - AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
    networks:
      - net
    depends_on:
      database:
        condition: service_healthy
      pull-model:
        condition: service_completed_successfully
    x-develop:
      watch:
        - action: rebuild
          path: .
          ignore:
            - loader.py
            - bot.py
            - pdf_bot.py
            - front-end/
    ports:
      - 8504:8504
    healthcheck:
      test: ["CMD-SHELL", "wget --no-verbose --tries=1 http://localhost:8504/ || exit 1"]
      interval: 5s
      timeout: 3s
      retries: 5

  front-end:
    build:
      context: .
      dockerfile: front-end.Dockerfile
    x-develop:
      watch:
        - action: sync
          path: ./front-end
          target: /app
          ignore:
            - ./front-end/node_modules/
        - action: rebuild
          path: ./front-end/package.json
    depends_on:
      api:
        condition: service_healthy
    networks:
      - net
    ports:
      - 8505:8505

networks:
  net:

1. Project Overview & Quickstart (docker/genai-stack)

File: README.md

GenAI Stack

The GenAI Stack will get you started building your own GenAI application in no time.
The demo applications can serve as inspiration or as a starting point.
Learn more about the details in the introduction blog post.

Configure

Create a .env file from the environment template file env.example

Available variables:

Variable Name Default value Description
OLLAMA_BASE_URL http://host.docker.internal:11434 REQUIRED - URL to Ollama LLM API
NEO4J_URI neo4j://database:7687 REQUIRED - URL to Neo4j database
NEO4J_USERNAME neo4j REQUIRED - Username for Neo4j database
NEO4J_PASSWORD password REQUIRED - Password for Neo4j database
LLM llama2 REQUIRED - Can be any Ollama model tag, or gpt-4 or gpt-3.5 or claudev2
EMBEDDING_MODEL sentence_transformer REQUIRED - Can be sentence_transformer, openai, aws, ollama or google-genai-embedding-001
AWS_ACCESS_KEY_ID REQUIRED - Only if LLM=claudev2 or embedding_model=aws
AWS_SECRET_ACCESS_KEY REQUIRED - Only if LLM=claudev2 or embedding_model=aws
AWS_DEFAULT_REGION REQUIRED - Only if LLM=claudev2 or embedding_model=aws
OPENAI_API_KEY REQUIRED - Only if LLM=gpt-4 or LLM=gpt-3.5 or embedding_model=openai
GOOGLE_API_KEY REQUIRED - Only required when using GoogleGenai LLM or embedding model google-genai-embedding-001
LANGCHAIN_ENDPOINT "https://api.smith.langchain.com" OPTIONAL - URL to Langchain Smith API
LANGCHAIN_TRACING_V2 false OPTIONAL - Enable Langchain tracing v2
LANGCHAIN_PROJECT OPTIONAL - Langchain project name
LANGCHAIN_API_KEY OPTIONAL - Langchain API key

LLM Configuration

MacOS and Linux users can use any LLM that's available via Ollama. Check the "tags" section under the model page you want to use on https://ollama.ai/library and write the tag for the value of the environment variable LLM= in the .env file.
All platforms can use GPT-3.5-turbo and GPT-4 (bring your own API keys for OpenAI models).

MacOS
Install Ollama on MacOS and start it before running docker compose up using ollama serve in a separate terminal.

Linux
No need to install Ollama manually, it will run in a container as
part of the stack when running with the Linux profile: run docker compose --profile linux up.
Make sure to set the OLLAMA_BASE_URL=http://llm:11434 in the .env file when using Ollama docker container.

To use the Linux-GPU profile: run docker compose --profile linux-gpu up. Also change OLLAMA_BASE_URL=http://llm-gpu:11434 in the .env file.

Windows
Ollama now supports Windows. Install Ollama on Windows and start it before running docker compose up using ollama serve in a separate terminal. Alternatively, Windows users can generate an OpenAI API key and configure the stack to use gpt-3.5 or gpt-4 in the .env file.

Develop

[!WARNING]
There is a performance issue that impacts python applications in the 4.24.x releases of Docker Desktop. Please upgrade to the latest release before using this stack.

To start everything

text
docker compose up

If changes to build scripts have been made, rebuild.

text
docker compose up --build

To enter watch mode (auto rebuild on file changes).
First start everything, then in new terminal:

text
docker compose watch

Shutdown
If health check fails or containers don't start up as expected, shutdown
completely to start up again.

text
docker compose down

Applications

Here's what's in this repo:

Name Main files Compose name URLs Description
Support Bot bot.py bot http://localhost:8501 Main usecase. Fullstack Python application.
Stack Overflow Loader loader.py loader http://localhost:8502 Load SO data into the database (create vector embeddings etc). Fullstack Python application.
PDF Reader pdf_bot.py pdf_bot http://localhost:8503 Read local PDF and ask it questions. Fullstack Python application.
Standalone Bot API api.py api http://localhost:8504 Standalone HTTP API streaming (SSE) + non-streaming endpoints Python.
Standalone Bot UI front-end/ front-end http://localhost:8505 Standalone client that uses the Standalone Bot API to interact with the model. JavaScript (Svelte) front-end.

The database can be explored at http://localhost:7474.

App 1 - Support Agent Bot

UI: http://localhost:8501
DB client: http://localhost:7474

  • answer support question based on recent entries
  • provide summarized answers with sources
  • demonstrate difference between
    • RAG Disabled (pure LLM response)
    • RAG Enabled (vector + knowledge graph context)
  • allow to generate a high quality support ticket for the current conversation based on the style of highly rated questions in the database.

(Chat input + RAG mode selector)

(CTA to auto generate support ticket draft) (UI of the auto generated support ticket draft)

App 2 - Loader

UI: http://localhost:8502
DB client: http://localhost:7474

  • import recent Stack Overflow data for certain tags into a KG
  • embed questions and answers and store them in vector index
  • UI: choose tags, run import, see progress, some stats of data in the database
  • Load high ranked questions (regardless of tags) to support the ticket generation feature of App 1.

App 3 Question / Answer with a local PDF

UI: http://localhost:8503
DB client: http://localhost:7474

This application lets you load a local PDF into text
chunks and embed it into Neo4j so you can ask questions about
its contents and have the LLM answer them using vector similarity
search.

App 4 Standalone HTTP API

Endpoints:

Example cURL command:

bash
curl http://localhost:8504/query-stream\?text\=minimal%20hello%20world%20in%20python\&rag\=false

Exposes the functionality to answer questions in the same way as App 1 above. Uses
same code and prompts.

App 5 Static front-end

UI: http://localhost:8505

This application has the same features as App 1, but is built separate from
the back-end code using modern best practices (Vite, Svelte, Tailwind).
The auto-reload on changes are instant using the Docker watch sync config.


File: Readme.md

GenAI Stack

The GenAI Stack will get you started building your own GenAI application in no time.
The demo applications can serve as inspiration or as a starting point.
Learn more about the details in the introduction blog post.

Configure

Create a .env file from the environment template file env.example

Available variables:

Variable Name Default value Description
OLLAMA_BASE_URL http://host.docker.internal:11434 REQUIRED - URL to Ollama LLM API
NEO4J_URI neo4j://database:7687 REQUIRED - URL to Neo4j database
NEO4J_USERNAME neo4j REQUIRED - Username for Neo4j database
NEO4J_PASSWORD password REQUIRED - Password for Neo4j database
LLM llama2 REQUIRED - Can be any Ollama model tag, or gpt-4 or gpt-3.5 or claudev2
EMBEDDING_MODEL sentence_transformer REQUIRED - Can be sentence_transformer, openai, aws, ollama or google-genai-embedding-001
AWS_ACCESS_KEY_ID REQUIRED - Only if LLM=claudev2 or embedding_model=aws
AWS_SECRET_ACCESS_KEY REQUIRED - Only if LLM=claudev2 or embedding_model=aws
AWS_DEFAULT_REGION REQUIRED - Only if LLM=claudev2 or embedding_model=aws
OPENAI_API_KEY REQUIRED - Only if LLM=gpt-4 or LLM=gpt-3.5 or embedding_model=openai
GOOGLE_API_KEY REQUIRED - Only required when using GoogleGenai LLM or embedding model google-genai-embedding-001
LANGCHAIN_ENDPOINT "https://api.smith.langchain.com" OPTIONAL - URL to Langchain Smith API
LANGCHAIN_TRACING_V2 false OPTIONAL - Enable Langchain tracing v2
LANGCHAIN_PROJECT OPTIONAL - Langchain project name
LANGCHAIN_API_KEY OPTIONAL - Langchain API key

LLM Configuration

MacOS and Linux users can use any LLM that's available via Ollama. Check the "tags" section under the model page you want to use on https://ollama.ai/library and write the tag for the value of the environment variable LLM= in the .env file.
All platforms can use GPT-3.5-turbo and GPT-4 (bring your own API keys for OpenAI models).

MacOS
Install Ollama on MacOS and start it before running docker compose up using ollama serve in a separate terminal.

Linux
No need to install Ollama manually, it will run in a container as
part of the stack when running with the Linux profile: run docker compose --profile linux up.
Make sure to set the OLLAMA_BASE_URL=http://llm:11434 in the .env file when using Ollama docker container.

To use the Linux-GPU profile: run docker compose --profile linux-gpu up. Also change OLLAMA_BASE_URL=http://llm-gpu:11434 in the .env file.

Windows
Ollama now supports Windows. Install Ollama on Windows and start it before running docker compose up using ollama serve in a separate terminal. Alternatively, Windows users can generate an OpenAI API key and configure the stack to use gpt-3.5 or gpt-4 in the .env file.

Develop

[!WARNING]
There is a performance issue that impacts python applications in the 4.24.x releases of Docker Desktop. Please upgrade to the latest release before using this stack.

To start everything

text
docker compose up

If changes to build scripts have been made, rebuild.

text
docker compose up --build

To enter watch mode (auto rebuild on file changes).
First start everything, then in new terminal:

text
docker compose watch

Shutdown
If health check fails or containers don't start up as expected, shutdown
completely to start up again.

text
docker compose down

Applications

Here's what's in this repo:

Name Main files Compose name URLs Description
Support Bot bot.py bot http://localhost:8501 Main usecase. Fullstack Python application.
Stack Overflow Loader loader.py loader http://localhost:8502 Load SO data into the database (create vector embeddings etc). Fullstack Python application.
PDF Reader pdf_bot.py pdf_bot http://localhost:8503 Read local PDF and ask it questions. Fullstack Python application.
Standalone Bot API api.py api http://localhost:8504 Standalone HTTP API streaming (SSE) + non-streaming endpoints Python.
Standalone Bot UI front-end/ front-end http://localhost:8505 Standalone client that uses the Standalone Bot API to interact with the model. JavaScript (Svelte) front-end.

The database can be explored at http://localhost:7474.

App 1 - Support Agent Bot

UI: http://localhost:8501
DB client: http://localhost:7474

  • answer support question based on recent entries
  • provide summarized answers with sources
  • demonstrate difference between
    • RAG Disabled (pure LLM response)
    • RAG Enabled (vector + knowledge graph context)
  • allow to generate a high quality support ticket for the current conversation based on the style of highly rated questions in the database.

(Chat input + RAG mode selector)

(CTA to auto generate support ticket draft) (UI of the auto generated support ticket draft)

App 2 - Loader

UI: http://localhost:8502
DB client: http://localhost:7474

  • import recent Stack Overflow data for certain tags into a KG
  • embed questions and answers and store them in vector index
  • UI: choose tags, run import, see progress, some stats of data in the database
  • Load high ranked questions (regardless of tags) to support the ticket generation feature of App 1.

App 3 Question / Answer with a local PDF

UI: http://localhost:8503
DB client: http://localhost:7474

This application lets you load a local PDF into text
chunks and embed it into Neo4j so you can ask questions about
its contents and have the LLM answer them using vector similarity
search.

App 4 Standalone HTTP API

Endpoints:

Example cURL command:

bash
curl http://localhost:8504/query-stream\?text\=minimal%20hello%20world%20in%20python\&rag\=false

Exposes the functionality to answer questions in the same way as App 1 above. Uses
same code and prompts.

App 5 Static front-end

UI: http://localhost:8505

This application has the same features as App 1, but is built separate from
the back-end code using modern best practices (Vite, Svelte, Tailwind).
The auto-reload on changes are instant using the Docker watch sync config.


File: readme.md

GenAI Stack

The GenAI Stack will get you started building your own GenAI application in no time.
The demo applications can serve as inspiration or as a starting point.
Learn more about the details in the introduction blog post.

Configure

Create a .env file from the environment template file env.example

Available variables:

Variable Name Default value Description
OLLAMA_BASE_URL http://host.docker.internal:11434 REQUIRED - URL to Ollama LLM API
NEO4J_URI neo4j://database:7687 REQUIRED - URL to Neo4j database
NEO4J_USERNAME neo4j REQUIRED - Username for Neo4j database
NEO4J_PASSWORD password REQUIRED - Password for Neo4j database
LLM llama2 REQUIRED - Can be any Ollama model tag, or gpt-4 or gpt-3.5 or claudev2
EMBEDDING_MODEL sentence_transformer REQUIRED - Can be sentence_transformer, openai, aws, ollama or google-genai-embedding-001
AWS_ACCESS_KEY_ID REQUIRED - Only if LLM=claudev2 or embedding_model=aws
AWS_SECRET_ACCESS_KEY REQUIRED - Only if LLM=claudev2 or embedding_model=aws
AWS_DEFAULT_REGION REQUIRED - Only if LLM=claudev2 or embedding_model=aws
OPENAI_API_KEY REQUIRED - Only if LLM=gpt-4 or LLM=gpt-3.5 or embedding_model=openai
GOOGLE_API_KEY REQUIRED - Only required when using GoogleGenai LLM or embedding model google-genai-embedding-001
LANGCHAIN_ENDPOINT "https://api.smith.langchain.com" OPTIONAL - URL to Langchain Smith API
LANGCHAIN_TRACING_V2 false OPTIONAL - Enable Langchain tracing v2
LANGCHAIN_PROJECT OPTIONAL - Langchain project name
LANGCHAIN_API_KEY OPTIONAL - Langchain API key

LLM Configuration

MacOS and Linux users can use any LLM that's available via Ollama. Check the "tags" section under the model page you want to use on https://ollama.ai/library and write the tag for the value of the environment variable LLM= in the .env file.
All platforms can use GPT-3.5-turbo and GPT-4 (bring your own API keys for OpenAI models).

MacOS
Install Ollama on MacOS and start it before running docker compose up using ollama serve in a separate terminal.

Linux
No need to install Ollama manually, it will run in a container as
part of the stack when running with the Linux profile: run docker compose --profile linux up.
Make sure to set the OLLAMA_BASE_URL=http://llm:11434 in the .env file when using Ollama docker container.

To use the Linux-GPU profile: run docker compose --profile linux-gpu up. Also change OLLAMA_BASE_URL=http://llm-gpu:11434 in the .env file.

Windows
Ollama now supports Windows. Install Ollama on Windows and start it before running docker compose up using ollama serve in a separate terminal. Alternatively, Windows users can generate an OpenAI API key and configure the stack to use gpt-3.5 or gpt-4 in the .env file.

Develop

[!WARNING]
There is a performance issue that impacts python applications in the 4.24.x releases of Docker Desktop. Please upgrade to the latest release before using this stack.

To start everything

text
docker compose up

If changes to build scripts have been made, rebuild.

text
docker compose up --build

To enter watch mode (auto rebuild on file changes).
First start everything, then in new terminal:

text
docker compose watch

Shutdown
If health check fails or containers don't start up as expected, shutdown
completely to start up again.

text
docker compose down

Applications

Here's what's in this repo:

Name Main files Compose name URLs Description
Support Bot bot.py bot http://localhost:8501 Main usecase. Fullstack Python application.
Stack Overflow Loader loader.py loader http://localhost:8502 Load SO data into the database (create vector embeddings etc). Fullstack Python application.
PDF Reader pdf_bot.py pdf_bot http://localhost:8503 Read local PDF and ask it questions. Fullstack Python application.
Standalone Bot API api.py api http://localhost:8504 Standalone HTTP API streaming (SSE) + non-streaming endpoints Python.
Standalone Bot UI front-end/ front-end http://localhost:8505 Standalone client that uses the Standalone Bot API to interact with the model. JavaScript (Svelte) front-end.

The database can be explored at http://localhost:7474.

App 1 - Support Agent Bot

UI: http://localhost:8501
DB client: http://localhost:7474

  • answer support question based on recent entries
  • provide summarized answers with sources
  • demonstrate difference between
    • RAG Disabled (pure LLM response)
    • RAG Enabled (vector + knowledge graph context)
  • allow to generate a high quality support ticket for the current conversation based on the style of highly rated questions in the database.

(Chat input + RAG mode selector)

(CTA to auto generate support ticket draft) (UI of the auto generated support ticket draft)

App 2 - Loader

UI: http://localhost:8502
DB client: http://localhost:7474

  • import recent Stack Overflow data for certain tags into a KG
  • embed questions and answers and store them in vector index
  • UI: choose tags, run import, see progress, some stats of data in the database
  • Load high ranked questions (regardless of tags) to support the ticket generation feature of App 1.

App 3 Question / Answer with a local PDF

UI: http://localhost:8503
DB client: http://localhost:7474

This application lets you load a local PDF into text
chunks and embed it into Neo4j so you can ask questions about
its contents and have the LLM answer them using vector similarity
search.

App 4 Standalone HTTP API

Endpoints:

Example cURL command:

bash
curl http://localhost:8504/query-stream\?text\=minimal%20hello%20world%20in%20python\&rag\=false

Exposes the functionality to answer questions in the same way as App 1 above. Uses
same code and prompts.

App 5 Static front-end

UI: http://localhost:8505

This application has the same features as App 1, but is built separate from
the back-end code using modern best practices (Vite, Svelte, Tailwind).
The auto-reload on changes are instant using the Docker watch sync config.


File: front-end/README.md

Svelte + Vite

This template should help get you started developing with Svelte in Vite.

VS Code + Svelte.

Need an official Svelte framework?

Check out SvelteKit, which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS and Less and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.

Technical considerations

Why use this over SvelteKit?

  • It brings its own routing solution which might not be preferable for some users.
  • It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.

This template contains as little as possible to get started with Vite + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other create-vite templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.

Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.

Why global.d.ts instead of compilerOptions.types inside jsconfig.json or tsconfig.json?

Setting compilerOptions.types shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace while also adding svelte and vite/client type information.

Why include .vscode/extensions.json?

Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.

Why enable checkJs in the JS template?

It is likely that most cases of changing variable types in runtime are likely to be accidental rather than deliberate. This provides advanced typechecking out of the box. Should you like to take advantage of the dynamically-typed nature of JavaScript, it is trivial to change the configuration.

Why is HMR not preserving my local component state?

HMR state preservation comes with a number of gotchas! It has been disabled by default in both svelte-hmr and @sveltejs/vite-plugin-svelte due to its often surprising behavior. You can read the details here.

If you have a state that's important to retain within a component, consider creating an external store that would not be replaced by HMR.

js
// store.js
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)

2. Official Technical Reference & Guides (docker/docs)

Docs @ Docker

Welcome to the Docker Documentation repository. This is the source for the Docker Docs Website.

Feel free to open pull requests or issues. Our docs are completely open source, and we deeply appreciate contributions from the Docker community!

Provide feedback

Weโ€™d love to hear your feedback! To submit feedback:

  • Click New issue on the docs repository, or
  • Click Request changes in the right column of every page on
    docs.docker.com, or
  • Click Give feedback on every page in the docs.

To get community support, use the Docker Community Slack. Personalized support is available
through the Docker Pro, Team, and Business subscriptions. See Docker
Pricing
for details.

If you have an idea for a new feature or behavior change in a specific aspect of
Docker or have found a product bug, file an issue in the project's
repository.

Contribute to Docker docs

We welcome contributions! To get started:

Copyright 2013-2026 Docker, Inc., released under the Apache 2.0 license.