CoolFace
Apppublic

hellanger/A-share_Daily_Limit_Monitoring

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
Dockerfile26 linesDownload Raw Back to root
1FROM python:3.11-slim2 3# 设置北京时间4ENV TZ=Asia/Shanghai5RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone6 7# 创建非 root 用户(Hugging Face Spaces 要求 UID 1000)8RUN useradd -m -u 1000 user9 10WORKDIR /app11 12# 安装依赖13COPY requirements.txt .14RUN pip install --no-cache-dir -r requirements.txt15 16# 复制所有文件,并确保所有权属于 user17COPY --chown=user . .18 19# 给 start.sh 添加执行权限20RUN chmod +x start.sh21 22# 切换到 user 用户23USER user24 25# 启动脚本26CMD ["./start.sh"]