coinpush / Dockerfile
local
添加 Dockerfile 支持 HuggingFace Spaces 部署
52ad3b7
Raw
History Blame Contribute Delete
416 Bytes
FROM python:3.11-slim
WORKDIR /app
# 安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY coinpush.py .
# 暴露端口
EXPOSE 7860
# 设置环境变量
ENV PYTHONUNBUFFERED=1
# 启动 Streamlit
CMD ["streamlit", "run", "coinpush.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true", "--server.enableXsrfProtection=false"]