fengkaobiguo / Dockerfile
Yaoliang's picture
feat: 更新和新增文件,修复依赖问题
c30406d
raw
history blame contribute delete
664 Bytes
# 使用Python 3.9官方镜像
FROM python:3.9-slim
# 设置工作目录
WORKDIR /app
# 安装系统依赖
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用文件
COPY . .
# 创建必要的目录
RUN mkdir -p uploads knowledge_base models
# 暴露端口
EXPOSE 8509
# 设置环境变量
ENV STREAMLIT_SERVER_PORT=8509
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
# 启动命令
CMD ["streamlit", "run", "simple_web.py", "--server.port=8509", "--server.address=0.0.0.0"]