MedResearchAgent / Dockerfile
leonsimon23's picture
Update Dockerfile
74a018c verified
raw
history blame contribute delete
555 Bytes
# 使用官方 Python 镜像作为基础镜像
FROM python:3.9-slim
# 设置工作目录
WORKDIR /app
# 复制依赖文件并安装
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY app.py ./
# 暴露 Hugging Face Spaces 期望的端口 7860
EXPOSE 7860
# 使用正确的端口和服务器模式运行 Streamlit 应用
# --server.port=7860 指定端口
# --server.headless=true 推荐用于自动化/服务器环境
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.headless=true"]