fix(event): add 401 handling to prevent infinite retry loop on auth failure
- UploadError struct to distinguish fatal auth errors from network errors - Clear buffer and throttle on 401/403 to save bandwidth - Prevent dead-loop retry when token is invalid or expired
This commit is contained in:
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
tianyan-edge:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: tianyan-edge:latest
|
||||
container_name: tianyan-edge
|
||||
restart: unless-stopped
|
||||
network_mode: "host"
|
||||
pid: "host"
|
||||
|
||||
# 显式映射 NPU 设备
|
||||
devices:
|
||||
- /dev/davinci0
|
||||
- /dev/davinci_manager
|
||||
- /dev/devmm_svm
|
||||
- /dev/hisi_hdc
|
||||
|
||||
volumes:
|
||||
# 🔑 核心:挂载宿主机 CANN 驱动与库
|
||||
- /usr/local/Ascend:/usr/local/Ascend:ro
|
||||
|
||||
# 挂载配置与模型
|
||||
- ./data/config:/opt/tianyan/config
|
||||
- ./data/model:/opt/tianyan/model
|
||||
|
||||
# 共享 Unix Socket 与日志
|
||||
- /tmp:/tmp
|
||||
- ./data/logs:/var/log/tianyan
|
||||
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
Reference in New Issue
Block a user