anystat / Dockerfile
ElvisWang111's picture
Upload folder using huggingface_hub
c9e7a99 verified
# FROM python:3.12-slim
# # ========= 设置工作目录 =========
# WORKDIR /app
# # ========= 安装依赖 =========
# COPY ./requirements.txt ./requirements.txt
# RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
# && pip install --no-cache-dir -r requirements.txt
# # ========= 拷贝项目文件 =========
# COPY . /app
# # ========= 暴露 Streamlit 端口 =========
# EXPOSE 8501
# # ========= 健康检查 =========
# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# # ========= 启动命令 =========
# CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
# ========= 基础镜像 =========
FROM python:3.12-slim
# ========= 改变工作目录 =========
WORKDIR /tmp
# ========= 安装依赖 =========
COPY ./requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# ========= 拷贝项目文件 =========
COPY . /tmp
# ========= 暴露端口并启动 =========
EXPOSE 8501
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]