vermind / Dockerfile
nev8r's picture
Update Dockerfile
26dbe21 verified
raw
history blame contribute delete
805 Bytes
FROM python:3.13.5-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
COPY src/ ./src/
# RUN ls -al ./src
# RUN pwd
RUN pip3 install -r requirements.txt
RUN pip3 install torch==2.8.0 --index-url https://download.pytorch.org/whl/cpu
EXPOSE 8501
EXPOSE 8000
# 健康检查
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# 启动命令
# 修改点:指向 src/app.py
# 注意:--ui 后面传给 python 脚本的参数不需要加 src/ 前缀,因为那只是个参数名,但前面的运行目标必须加路径
ENTRYPOINT ["streamlit", "run", "./src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--", "--ui", "--port=8000", "--host=0.0.0.0"]