Spaces:
Sleeping
Sleeping
File size: 1,088 Bytes
c9e7a99 01c66db 78305f7 48ad5f7 01c66db c9e7a99 78305f7 1002a93 01c66db 48ad5f7 78305f7 c9e7a99 48ad5f7 01c66db 9caffa6 4d4f935 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# 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"]
|