Skip to content

Commit

Permalink
Update docker compose (#323)
Browse files Browse the repository at this point in the history
* Update docker compose

* update compose

* Update compose.gpu.yaml

* Update compose.yaml
  • Loading branch information
moria97 authored Dec 25, 2024
1 parent 04c3891 commit 0c8738d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
57 changes: 57 additions & 0 deletions docker/compose.gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
services:
api:
image: mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:1.0.0-gpu
ports:
- "8001:8001"
restart: always
environment:
DASHSCOPE_API_KEY: ${DASHSCOPE_API_KEY}
OSS_ACCESS_KEY_ID: ${OSS_ACCESS_KEY_ID}
OSS_ACCESS_KEY_SECRET: ${OSS_ACCESS_KEY_SECRET}
PAIRAG_RAG__oss_store__bucket: ${OSS_BUCKET}
PAIRAG_RAG__oss_store__endpoint: ${OSS_ENDPOINT:-oss-cn-hangzhou.aliyuncs.com}
ARMS_APP_NAME: ${ARMS_APP_NAME}
ARMS_REGION_ID: ${ARMS_REGION_ID}
ARMS_LICENSE_KEY: ${ARMS_LICENSE_KEY}
ARMS_IS_PUBLIC: true
ENABLE_FASTAPI: false
ENABLE_REQUESTS: false
ENABLE_AIOHTTPCLIENT: false
ENABLE_HTTPX: false
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

volumes:
- ../model_repository:/app/model_repository
- ./app_data:/app/localdata
entrypoint: ["pai_rag", "serve"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/api/v1/health"]
interval: 30s
retries: 40
start_period: 20s

web:
image: mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:1.0.0-ui
ports:
- "8002:8002"
restart: always
environment:
DASHSCOPE_API_KEY: ${DASHSCOPE_API_KEY}
depends_on:
- api
entrypoint: ["pai_rag", "ui", "-c", "http://api:8001"]

nginx:
image: mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/mybigpai/pairag:1.0.0-nginx
volumes:
- ./nginx/default.conf.compose:/etc/nginx/conf.d/default.conf
ports:
- "8000:8000"
entrypoint: ["/docker-entrypoint.sh", "nginx"]
restart: always
8 changes: 8 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ services:
OSS_ACCESS_KEY_SECRET: ${OSS_ACCESS_KEY_SECRET}
PAIRAG_RAG__oss_store__bucket: ${OSS_BUCKET}
PAIRAG_RAG__oss_store__endpoint: ${OSS_ENDPOINT:-oss-cn-hangzhou.aliyuncs.com}
ARMS_APP_NAME: ${ARMS_APP_NAME}
ARMS_REGION_ID: ${ARMS_REGION_ID}
ARMS_LICENSE_KEY: ${ARMS_LICENSE_KEY}
ARMS_IS_PUBLIC: true
ENABLE_FASTAPI: false
ENABLE_REQUESTS: false
ENABLE_AIOHTTPCLIENT: false
ENABLE_HTTPX: false

volumes:
- ../model_repository:/app/model_repository
Expand Down

0 comments on commit 0c8738d

Please sign in to comment.