You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
321 lines
9.0 KiB
YAML
321 lines
9.0 KiB
YAML
services:
|
|
ircfa-app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: digitaltwin_ircfa
|
|
working_dir: /app
|
|
restart: always
|
|
ports:
|
|
- "3025:3021"
|
|
environment:
|
|
- ENV=development
|
|
- LOG_LEVEL=INFO
|
|
- PORT=3021
|
|
- HOST=0.0.0.0
|
|
- DATABASE_HOSTNAME=192.168.1.85
|
|
- DATABASE_PORT=5432
|
|
- DATABASE_CREDENTIAL_USER=postgres
|
|
- DATABASE_CREDENTIAL_PASSWORD=postgres
|
|
- DATABASE_NAME=digital_twin
|
|
- COLLECTOR_HOSTNAME=192.168.1.86
|
|
- COLLECTOR_PORT=5432
|
|
- COLLECTOR_CREDENTIAL_USER=postgres
|
|
- COLLECTOR_CREDENTIAL_PASSWORD=postgres
|
|
- COLLECTOR_NAME=digital_twin
|
|
- PFI_API_URL=http://192.168.1.82:8000/pfi/api/v1
|
|
- RP_API_URL=http://192.168.1.82:8000/reliability
|
|
- PLANT_STATUS_URL=http://192.168.1.82:8000/monitoring/plant-status
|
|
- WINDOWS_AEROS_BASE_URL=http://192.168.1.87:8800
|
|
- MODEL_SERVER_URL="https://dev-new-kong.air.id/dev-poc-its/v1"
|
|
- OLLAMA_BASE_URL=http://192.168.1.100:11434
|
|
- OLLAMA_MODEL_NAME=qwen3:8b
|
|
- VLLM_BASE_URL=http://192.168.1.100:8020/v1
|
|
- VLLM_MODEL_NAME=/models/qwen_6_std
|
|
command: make run
|
|
volumes:
|
|
- ./src/uploads:/app/src/uploads
|
|
|
|
|
|
kong:
|
|
image: kong/kong-gateway:3.7.1.2
|
|
container_name: kong-dbless
|
|
restart: always
|
|
environment:
|
|
- KONG_DATABASE=off
|
|
- KONG_DECLARATIVE_CONFIG=/kong/declarative/kong.yml
|
|
- KONG_PROXY_ACCESS_LOG=/dev/stdout
|
|
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
|
|
- KONG_PROXY_ERROR_LOG=/dev/stderr
|
|
- KONG_ADMIN_ERROR_LOG=/dev/stderr
|
|
- KONG_ADMIN_LISTEN=0.0.0.0:8001
|
|
- KONG_ADMIN_GUI_URL=http://192.168.1.100:8002
|
|
- KONG_LICENSE_DATA
|
|
- KONG_NGINX_PROXY_PROXY_REQUEST_BUFFERING=off
|
|
ports:
|
|
- "8000:8000"
|
|
- "8443:8443"
|
|
- "8001:8001"
|
|
- "8444:8444"
|
|
- "8010:8002"
|
|
- "8445:8445"
|
|
- "8003:8003"
|
|
- "8004:8004"
|
|
volumes:
|
|
- .:/kong/declarative # Volume mount for declarative config
|
|
|
|
# Use the code below to apply the vllm service
|
|
# --reasoning_parser deepseek-r1
|
|
vllm:
|
|
image: vllm/vllm-openai:latest
|
|
runtime: nvidia
|
|
environment:
|
|
- CUDA_VISIBLE_DEVICES=0,1
|
|
- VLLM_LOG_LEVEL=INFO
|
|
volumes:
|
|
- /mnt/data_backup/models:/models
|
|
ports:
|
|
- "8020:8000"
|
|
ipc: host
|
|
command: >
|
|
--model "Qwen/Qwen3-30B-A3B-Instruct-2507-FP8"
|
|
--dtype float16
|
|
--tensor-parallel-size 2
|
|
--max-model-len 16382
|
|
--max-num-batched-tokens 3072
|
|
--max-num-seqs 64
|
|
--enforce-eager
|
|
--trust-remote-code true
|
|
--enable_prefix_caching true
|
|
|
|
llama-cpp:
|
|
image: ghcr.io/ggml-org/llama.cpp:server-cuda
|
|
container_name: llama-cpp-server
|
|
restart: unless-stopped
|
|
mem_limit: 40g
|
|
memswap_limit: 40g
|
|
oom_kill_disable: false
|
|
oom_score_adj: 100
|
|
ports:
|
|
- "8087:8087"
|
|
volumes:
|
|
- /mnt/data_backup/model-qwen:/data:ro
|
|
# Using environment variables for easy model swapping and parameter tuning
|
|
command: >
|
|
-m /data/Qwen3-30B-A3B-Q4_K_M.gguf
|
|
--reasoning off
|
|
-ngl ${LLAMA_CPP_N_GPU_LAYERS:-99}
|
|
-c ${LLAMA_CPP_CTX_SIZE:-131072}
|
|
-t ${LLAMA_CPP_THREADS:-8}
|
|
-b ${LLAMA_CPP_BATCH_SIZE:-2048}
|
|
-ub ${LLAMA_CPP_UBATCH_SIZE:-512}
|
|
--temp 0
|
|
--top-k 20
|
|
--top-p 0.95
|
|
--min-p 0
|
|
-fa on
|
|
-sm row
|
|
--rope-scaling ${LLAMA_CPP_ROPE_SCALING:-yarn}
|
|
--rope-scale ${LLAMA_CPP_ROPE_SCALE:-4}
|
|
--yarn-orig-ctx ${LLAMA_CPP_YARN_ORIG_CTX:-32768}
|
|
--no-context-shift
|
|
--host 0.0.0.0
|
|
--port 8087
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8087/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
capabilities: [gpu]
|
|
device_ids: ['all']
|
|
|
|
vllm-gemma:
|
|
image: vllm/vllm-openai:latest
|
|
runtime: nvidia
|
|
container_name: vllm-gemma-4
|
|
environment:
|
|
- CUDA_VISIBLE_DEVICES=0,1
|
|
- VLLM_LOG_LEVEL=INFO
|
|
- HF_TOKEN=${HF_TOKEN}
|
|
volumes:
|
|
- /mnt/data_backup/models:/root/.cache/huggingface
|
|
ports:
|
|
- "8021:8000"
|
|
ipc: host
|
|
command: >
|
|
--model "unsloth/gemma-4-E2B-it"
|
|
--tensor-parallel-size 2
|
|
--max-model-len 8192
|
|
--gpu-memory-utilization 0.90
|
|
|
|
llamacpp-gemma:
|
|
image: ghcr.io/ggml-org/llama.cpp:server-cuda
|
|
container_name: llamacpp-gemma-4
|
|
restart: unless-stopped
|
|
mem_limit: 40g
|
|
memswap_limit: 40g
|
|
oom_kill_disable: false
|
|
oom_score_adj: 100
|
|
ports:
|
|
- "8088:8087"
|
|
volumes:
|
|
- /mnt/data_backup/models:/data:ro
|
|
command: >
|
|
-m /data/gemma-4-26B-A4B-it-UD-Q4_K_M.gguf
|
|
--mmproj /data/mmproj-BF16.gguf
|
|
--reasoning off
|
|
-ngl ${LLAMA_CPP_N_GPU_LAYERS:-99}
|
|
-c ${LLAMA_CPP_CTX_SIZE:-196608}
|
|
-t ${LLAMA_CPP_THREADS:-8}
|
|
-b ${LLAMA_CPP_BATCH_SIZE:-2048}
|
|
-ub ${LLAMA_CPP_UBATCH_SIZE:-512}
|
|
--temp 0
|
|
--top-k 20
|
|
--top-p 0.95
|
|
--min-p 0
|
|
-fa on
|
|
-sm layer
|
|
--rope-scaling yarn
|
|
--rope-scale 1.5
|
|
--yarn-orig-ctx 131072
|
|
--no-context-shift
|
|
--host 0.0.0.0
|
|
--port 8087
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8087/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
capabilities: [gpu]
|
|
device_ids: ['all']
|
|
|
|
# --- ALTERNATIVE GEMMA 4 MODELS FOR TESTING AND COMPARISON ---
|
|
# Uncomment the service you wish to test. Ensure you have downloaded the corresponding GGUF file.
|
|
|
|
# 1. Gemma 4 E4B (4B parameters, ~7.6GB Q8_0, highly efficient, runs on GPU 0)
|
|
# llamacpp-gemma-e4b:
|
|
# image: ghcr.io/ggml-org/llama.cpp:server-cuda
|
|
# container_name: llamacpp-gemma-e4b
|
|
# restart: unless-stopped
|
|
# ports:
|
|
# - "8088:8087" # Maps to 8088 (same port as standard gemma service)
|
|
# volumes:
|
|
# - /mnt/data_backup/models:/data:ro
|
|
# environment:
|
|
# - CUDA_VISIBLE_DEVICES=0
|
|
# command: >
|
|
# -m /data/gemma-4-E4B-it-Q8_0.gguf
|
|
# --host 0.0.0.0
|
|
# --port 8087
|
|
# -ngl 99
|
|
# -c 8192
|
|
# --parallel 1
|
|
# --temp 0.15
|
|
# --reasoning off
|
|
# healthcheck:
|
|
# test: ["CMD", "curl", "-f", "http://localhost:8087/health"]
|
|
# interval: 30s
|
|
# timeout: 5s
|
|
# retries: 3
|
|
# start_period: 10s
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# capabilities: [gpu]
|
|
# device_ids: ['0']
|
|
|
|
# 2. Gemma 4 26B (26B parameters, ~15.8GB UD-Q4_K_M, runs on GPU 1 to balance load)
|
|
# llamacpp-gemma-26b:
|
|
# image: ghcr.io/ggml-org/llama.cpp:server-cuda
|
|
# container_name: llamacpp-gemma-26b
|
|
# restart: unless-stopped
|
|
# ports:
|
|
# - "8089:8087" # Runs on port 8089
|
|
# volumes:
|
|
# - /mnt/data_backup/models:/data:ro
|
|
# environment:
|
|
# - CUDA_VISIBLE_DEVICES=1
|
|
# command: >
|
|
# -m /data/gemma-4-26B-A4B-it-UD-Q4_K_M.gguf
|
|
# --host 0.0.0.0
|
|
# --port 8087
|
|
# -ngl ${LLAMA_CPP_N_GPU_LAYERS:-99}
|
|
# -c ${LLAMA_CPP_CTX_SIZE:-131072}
|
|
# -t ${LLAMA_CPP_THREADS:-8}
|
|
# -b ${LLAMA_CPP_BATCH_SIZE:-2048}
|
|
# -ub ${LLAMA_CPP_UBATCH_SIZE:-512}
|
|
# --parallel 1
|
|
# --temp 0.15
|
|
# -sm layer
|
|
# --reasoning off
|
|
# healthcheck:
|
|
# test: ["CMD", "curl", "-f", "http://localhost:8087/health"]
|
|
# interval: 30s
|
|
# timeout: 5s
|
|
# retries: 3
|
|
# start_period: 10s
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# capabilities: [gpu]
|
|
# device_ids: ['1']
|
|
|
|
# 3. Gemma 4 31B (31B parameters, ~17GB UD-Q4_K_M, runs on GPU 1)
|
|
# llamacpp-gemma-31b:
|
|
# image: ghcr.io/ggml-org/llama.cpp:server-cuda
|
|
# container_name: llamacpp-gemma-31b
|
|
# restart: unless-stopped
|
|
# ports:
|
|
# - "8090:8087" # Runs on port 8090
|
|
# volumes:
|
|
# - /mnt/data_backup/models:/data:ro
|
|
# environment:
|
|
# - CUDA_VISIBLE_DEVICES=1
|
|
# command: >
|
|
# -m /data/gemma-4-31B-it-Q4_K_M.gguf
|
|
# --host 0.0.0.0
|
|
# --port 8087
|
|
# -ngl ${LLAMA_CPP_N_GPU_LAYERS:-99}
|
|
# -c ${LLAMA_CPP_CTX_SIZE:-131072}
|
|
# -t ${LLAMA_CPP_THREADS:-8}
|
|
# -b ${LLAMA_CPP_BATCH_SIZE:-2048}
|
|
# -ub ${LLAMA_CPP_UBATCH_SIZE:-512}
|
|
# --parallel 1
|
|
# --temp 0.15
|
|
# --reasoning off
|
|
# --rope-scaling ${LLAMA_CPP_ROPE_SCALING:-yarn}
|
|
# --rope-scale ${LLAMA_CPP_ROPE_SCALE:-4}
|
|
# --yarn-orig-ctx ${LLAMA_CPP_YARN_ORIG_CTX:-32768}
|
|
# healthcheck:
|
|
# test: ["CMD", "curl", "-f", "http://localhost:8087/health"]
|
|
# interval: 30s
|
|
# timeout: 5s
|
|
# retries: 3
|
|
# start_period: 10s
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# capabilities: [gpu]
|
|
# device_ids: ['1']
|