This repository was archived by the owner on Mar 30, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (45 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
51 lines (45 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
services:
chronos-service:
container_name: timeseries_forecast
build:
context: .
dockerfile: server/Dockerfile
ports:
- "5001:5001" # 端口映射
volumes:
# Chronos-2 权重(建议只读挂载)
- ./server/app/models/model_save/chronos_model:/app/server/app/models/model_save/chronos_model:ro
# 微调模型保存目录(可写)
- ./server/app/models/model_save/finetuned_models:/app/server/app/models/model_save/finetuned_models
environment:
- APP_NAME=Chronos_Forecast_Service
- CHRONOS_MODEL_PATH=/app/server/app/models/model_save/chronos_model
# === 开发模式配置 (当前开启) ===
- ENVIRONMENT=dev
- DEBUG=true # 开启热重载,代码改动即生效
- LOG_LEVEL=debug #以此看到具体的预测数据流
# === 生产模式配置 (上线时取消注释,注释掉上面的) ===
# - ENVIRONMENT=prod
# - DEBUG=false # 关闭热重载,提升性能
# - LOG_LEVEL=info # 只记录关键信息,避免日志文件过大
restart: unless-stopped
# 如果您需要使用 GPU 且已安装 nvidia-container-toolkit,请取消下方注释
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
frontend:
container_name: timeseries_forecast_frontend
build:
context: ./frontend
dockerfile: Dockerfile
args:
- VITE_API_BASE_URL=http://localhost:5001
ports:
- "5173:80"
depends_on:
- timeseries_forecast
restart: unless-stopped