bert_base/Dockerfile

22 lines
437 B
Docker

FROM registry.cn-chengdu.aliyuncs.com/go_ls/bert_base:latest
WORKDIR /app
COPY services/ ./services/
COPY scripts/ ./scripts/
COPY .env .env
# 生成 supervisor 配置
RUN python scripts/generate_supervisor_conf.py
# 创建日志目录
RUN mkdir -p /var/log/supervisor /app/logs /app/model_cache
# 启动命令
CMD ["sh", "-c", "mkdir -p /tmp/gunicorn && python scripts/download_models.py && supervisord -c ./supervisor.conf"]