fix ffmpeg

This commit is contained in:
op
2026-05-27 13:48:27 +08:00
parent 156e4ce095
commit bb5678858d
15 changed files with 512 additions and 106 deletions

View File

@@ -4,9 +4,11 @@
#
# 5-6 ActionFormer 实时算法(默认开启):
# - app/resources/actionformer_epoch_045.pth.tar 必须存在(离线下发,~110MB未入 git
# - VideoSwin Swin3D-T 走 torchvision Kinetics-400 预训练,**首次运行需联网下载**
# 可设 TORCH_HOME 指向持久化目录(容器中已默认 /root/.cache/torch或将权重
# 提前预热到该目录避免开录时拉取
# - VideoSwin Swin3D-T 权重在 Docker 构建时预下载到 /app/.cache/torch见 scripts/bake_torch_hub_checkpoint.py
# 运行时不再访问 pytorch.org。「首次运行」指 torch 缓存为空时才会联网下载;现已改为构建时烘焙进镜像。
# 国内 PyPI 镜像(南大/清华/阿里)不同步 /models/*.pth构建默认先试 uv.agentsmirror.com 再回退官方源
# 离线/弱网:先 wget 权重到 backend/weights/swin3d_t-7615ae03.pth再 docker compose build api。
# 或docker compose build --build-arg PYTORCH_MODELS_URL=https://your-mirror/.../swin3d_t-7615ae03.pth api
# - Linux GPU 机:镜像内 torch / torchvision / torchaudio 为 cu130 wheel
# 宿主机需 NVIDIA 驱动 + NVIDIA Container Toolkit`api` 服务已配置 `gpus: all`。
# 启动后可验证docker compose exec api python -c "import torch; print(torch.cuda.is_available())"
@@ -28,9 +30,9 @@ POSTGRES_PORT=45432
HOST_UID=1000
HOST_GID=1000
DOCKER_GID=999
# 非 root 运行时 uv/torch 缓存目录compose 内已设为 /tmp/*,一般无需改
# 非 root 运行时 uv/torch 缓存目录compose 内已设TORCH_HOME 为镜像内预烘焙路径
# UV_CACHE_DIR=/tmp/uv-cache
# TORCH_HOME=/tmp/torch-cache
# TORCH_HOME=/app/.cache/torch
# --- HTTPAPI 对外端口)---
# 局域网语音确认终端 / Demo 客户端访问 API 时,填写