Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
* @sr-remsha @PolinaGurinovich97
/dial-cookbook/ @adubovik
/dial-docker-compose/ @adubovik
/.github/ @nepalevov @alexey-ban
22 changes: 22 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,35 @@ jobs:
cd ./dial-docker-compose/ci/ollama
docker compose up --abort-on-container-exit --exit-code-from test --timeout 300

run-advanced-v1-smoke-test:
name: Docker compose advanced v1 smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: isbang/compose-action@d2bee4f07e8ca410d6b196d00f90c12e7d48c33a # v2.6.0
with:
cwd: "./dial-docker-compose-advanced-v1/ci"
up-flags: "--abort-on-container-exit --exit-code-from test --timeout 300"

run-advanced-v2-smoke-test:
name: Docker compose advanced v2 smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: isbang/compose-action@d2bee4f07e8ca410d6b196d00f90c12e7d48c33a # v2.6.0
with:
cwd: "./dial-docker-compose-advanced-v2/ci"
up-flags: "--abort-on-container-exit --exit-code-from test --timeout 300"

build:
needs:
- run-notebooks
- run-quickstart-model
- run-quickstart-application
- run-quickstart-addon
- run-quickstart-self-hosted-model
- run-advanced-v1-smoke-test
- run-advanced-v2-smoke-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,35 @@ jobs:
cd ./dial-docker-compose/ci/ollama
docker compose up --abort-on-container-exit --exit-code-from test --timeout 300

run-advanced-v1-smoke-test:
name: Docker compose advanced v1 smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: isbang/compose-action@d2bee4f07e8ca410d6b196d00f90c12e7d48c33a # v2.6.0
with:
cwd: "./dial-docker-compose-advanced-v1/ci"
up-flags: "--abort-on-container-exit --exit-code-from test --timeout 300"

run-advanced-v2-smoke-test:
name: Docker compose advanced v2 smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: isbang/compose-action@d2bee4f07e8ca410d6b196d00f90c12e7d48c33a # v2.6.0
with:
cwd: "./dial-docker-compose-advanced-v2/ci"
up-flags: "--abort-on-container-exit --exit-code-from test --timeout 300"

build-and-deploy:
needs:
- run-notebooks
- run-quickstart-model
- run-quickstart-application
- run-quickstart-addon
- run-quickstart-self-hosted-model-ollama
- run-advanced-v1-smoke-test
- run-advanced-v2-smoke-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
Expand Down
7 changes: 7 additions & 0 deletions dial-docker-compose-advanced-v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# admin-backend runtime data (H2 db, etc.)
admin/

core-data/
core-logs/

keycloak/data/
15 changes: 15 additions & 0 deletions dial-docker-compose-advanced-v1/ci/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
include:
- path: ../docker-compose-base.yml
env_file: ../.env

services:
test:
build: test
environment:
CORE_URL: "http://core:8080"
KEYCLOAK_URL: "http://keycloak:${KC_PORT:-8900}"
depends_on:
core:
condition: service_started
keycloak:
condition: service_started
7 changes: 7 additions & 0 deletions dial-docker-compose-advanced-v1/ci/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.11-alpine

WORKDIR /app
COPY * /app
RUN pip install -r requirements.txt

CMD ["python", "app.py"]
42 changes: 42 additions & 0 deletions dial-docker-compose-advanced-v1/ci/test/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import asyncio
import logging
import os

import aiohttp
import backoff


def get_env(name: str) -> str:
value = os.environ.get(name)
if value is None:
raise ValueError(f"'{name}' environment variable must be defined")
return value


CORE_URL = get_env("CORE_URL")
KEYCLOAK_URL = get_env("KEYCLOAK_URL")

logging.basicConfig(level=logging.INFO)


@backoff.on_exception(
backoff.expo,
(aiohttp.ClientError, asyncio.TimeoutError),
max_time=120,
)
async def check_reachable(url: str):
timeout = aiohttp.ClientTimeout(total=10)
async with aiohttp.ClientSession(timeout=timeout) as session:
async with session.get(url) as response:
logging.info("%s -> %s", url, response.status)
if response.status >= 500:
raise RuntimeError(f"{url} responded with {response.status}")


async def tests():
await check_reachable(f"{KEYCLOAK_URL}/realms/master")
await check_reachable(f"{CORE_URL}/health")


if __name__ == "__main__":
asyncio.run(tests())
2 changes: 2 additions & 0 deletions dial-docker-compose-advanced-v1/ci/test/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
aiohttp==3.14.3
backoff==2.2.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

themes:
image: epam/ai-dial-chat-themes:0.10.0
image: epam/ai-dial-chat-themes:0.19.1
platform: linux/amd64
ports:
- "3101:8080"
Expand All @@ -21,7 +21,7 @@ services:
mem_limit: 2200M

chat:
image: epam/ai-dial-chat:0.41.7
image: epam/ai-dial-chat:0.49.3
platform: linux/amd64
environment:
AUTH_KEYCLOAK_CLIENT_ID: "dial-chat"
Expand All @@ -47,7 +47,7 @@ services:
restart: always

core:
image: epam/ai-dial-core:0.39.2
image: epam/ai-dial-core:0.47.1
platform: linux/amd64
environment:
'JAVA_OPTS': '-Dgflog.config=/opt/settings/gflog.xml'
Expand Down Expand Up @@ -78,7 +78,7 @@ services:
restart: always

adapter-openai:
image: epam/ai-dial-adapter-openai:0.36.1
image: epam/ai-dial-adapter-openai:0.43.2
platform: linux/amd64
environment:
DALLE3_DEPLOYMENTS: "dall-e-3"
Expand Down Expand Up @@ -111,7 +111,7 @@ services:
restart: always

admin-backend:
image: epam/ai-dial-admin-backend:0.13.0
image: epam/ai-dial-admin-backend:0.20.0
platform: linux/amd64
user: root
environment:
Expand Down Expand Up @@ -142,7 +142,7 @@ services:
restart: always

admin-frontend:
image: epam/ai-dial-admin-frontend:0.13.0
image: epam/ai-dial-admin-frontend:0.20.0
platform: linux/amd64
environment:
DIAL_ADMIN_API_URL: "http://admin-backend:8080/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include:
services:

dial-rag:
image: ghcr.io/epam/ai-dial-rag:0.32.0
image: ghcr.io/epam/ai-dial-rag:0.43.0
platform: linux/amd64
env_file: .env
environment:
Expand Down
23 changes: 23 additions & 0 deletions dial-docker-compose-advanced-v2/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
COMMON_HOST=localhost

# Core
DIAL_CORE_HOST_PORT=8081
DIAL_CORE_ENCRYPTION_SECRET=core_encryption_secret
DIAL_CORE_ENCRYPTION_KEY=core_encryption_key

# Chat
DIAL_CHAT_HOST_PORT=3100
AUTH_SESSION_SECRET=f48bbcf155737c653c87b307b3fa84d49e2038c835415c3bfa16c9cc68a9406e
AUTH_KEYCLOAK_SECRET=keycloak_secret

# Keycloak
KC_ADMIN_PASSWORD=admin
KC_PORT=8900
KC_HTTPS_PORT=8901

# Admin
DIAL_ADMIN_FRONTEND_HOST_PORT=3102
NEXTAUTH_SECRET=JujxVSQV/VsqvE6qi92YwelW6FX/wXtGDpTmyVlyoEA=
H2_DATASOURCE_MASTER_KEY=t8+npcgNMiipR+kHMb8zXAjgA3IedCXC
H2_DATASOURCE_ENCRYPTED_FILE_KEY=9vW1l/Eg+1J3YXpCsyR6AUI4ptMtI6pjkktePuUQts+wKVAauoP5CG21z5WTzp91xBcEww==
H2_DATASOURCE_PASSWORD=password
7 changes: 7 additions & 0 deletions dial-docker-compose-advanced-v2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# admin-backend runtime data (H2 db, etc.)
admin/

core-data/
core-logs/

keycloak/data/
36 changes: 36 additions & 0 deletions dial-docker-compose-advanced-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# DIAL Docker Compose (DIAL 2.0)

### 1. Setup model endpoints and keys

Update `./core/config.json` with real upstream model endpoints and keys.

### 2. Run the Docker Compose file

```
docker compose -f <filename> up
```

Choose one of the Compose files depending on your needs:

|File|Description|
|---|---|
|docker-compose-base.yml|Runs Core, Chat, Admin, Keycloak and required underlying services|
|docker-compose-full.yml|Runs RAG in addition to the base services from above|

### 3. Start using DIAL

|URL|Description|
|---|---|
|http://localhost:3100|DIAL Chat|
|http://localhost:3102|DIAL Admin|
|http://localhost:8900|Keycloak|

There are three default DIAL users pre-defined in Keycloak:

|Username|Password|Description|
|---|---|---|
|user|dial|Has only basic access to DIAL Chat|
|dial|dial|Has admin access to DIAL Chat|
|dial-admin|dial|Has access to DIAL Admin console|

Use `admin` as a user and a password to login to Keycloak as administrator.
15 changes: 15 additions & 0 deletions dial-docker-compose-advanced-v2/ci/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
include:
- path: ../docker-compose-base.yml
env_file: ../.env

services:
test:
build: test
environment:
CORE_URL: "http://core:8080"
KEYCLOAK_URL: "http://keycloak:${KC_PORT:-8900}"
depends_on:
core:
condition: service_started
keycloak:
condition: service_healthy
7 changes: 7 additions & 0 deletions dial-docker-compose-advanced-v2/ci/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM python:3.11-alpine

WORKDIR /app
COPY * /app
RUN pip install -r requirements.txt

CMD ["python", "app.py"]
42 changes: 42 additions & 0 deletions dial-docker-compose-advanced-v2/ci/test/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import asyncio
import logging
import os

import aiohttp
import backoff


def get_env(name: str) -> str:
value = os.environ.get(name)
if value is None:
raise ValueError(f"'{name}' environment variable must be defined")
return value


CORE_URL = get_env("CORE_URL")
KEYCLOAK_URL = get_env("KEYCLOAK_URL")

logging.basicConfig(level=logging.INFO)


@backoff.on_exception(
backoff.expo,
(aiohttp.ClientError, asyncio.TimeoutError),
max_time=120,
)
async def check_reachable(url: str):
timeout = aiohttp.ClientTimeout(total=10)
async with aiohttp.ClientSession(timeout=timeout) as session:
async with session.get(url) as response:
logging.info("%s -> %s", url, response.status)
if response.status >= 500:
raise RuntimeError(f"{url} responded with {response.status}")


async def tests():
await check_reachable(f"{KEYCLOAK_URL}/realms/master")
await check_reachable(f"{CORE_URL}/health")


if __name__ == "__main__":
asyncio.run(tests())
2 changes: 2 additions & 0 deletions dial-docker-compose-advanced-v2/ci/test/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
aiohttp==3.14.3
backoff==2.2.1
Loading
Loading