health-assistant / Dockerfile
yuting111222's picture
Optimize for Docker Space - fix startup and dependencies
ab2fb3c
raw
history blame contribute delete
418 Bytes
FROM python:3.10-slim
WORKDIR /app
# 安裝系統依賴
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# 暴露端口
EXPOSE 7860
# 設置環境變量
ENV PORT=7860
ENV HOST=0.0.0.0
# 啟動命令 - 使用 app.py 而不是 main.py
CMD ["python", "app.py"]