- 后端新增 storage 模块(minio_store),支持 MinIO 预签名 URL 上传与对象管理 - config 新增 MinIO 及存储等待相关配置项 - 算力节点新增 /compute/cache/prepare 缓存预下载接口(带校验和原子落盘) - 算力节点健康接口增加存储可用性探针 - SQL 迁移补充资源存储相关表结构 - Docker 新增 minio 服务与后端 minio 配置 - 补充 minio-compute-cache-plan 设计文档 Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
889 B
Docker
26 lines
889 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1 \
|
|
TIKTOKEN_CACHE_DIR=/opt/tiktoken_cache
|
|
|
|
WORKDIR /app
|
|
|
|
COPY backend/requirements.txt /tmp/requirements.txt
|
|
RUN pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple \
|
|
&& pip install -r /tmp/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple \
|
|
&& rm -f /tmp/requirements.txt
|
|
|
|
RUN python -c "import fastapi, uvicorn, psycopg, psycopg_pool, sqlalchemy, redis, jwt, passlib, httpx, minio, alembic; print('backend dependency check ok')"
|
|
|
|
RUN mkdir -p /opt/yg-ft/logs/backend /data/yg-ft \
|
|
&& chmod -R 0775 /opt/yg-ft /data/yg-ft
|
|
|
|
# 离线打包 tiktoken cl100k_base 词表,避免无网环境下运行时联网下载
|
|
COPY docker/app/tiktoken /opt/tiktoken_cache
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|