GenAICoursesDB / Dockerfile
claudqunwang's picture
Switch to Docker SDK: Fix Gradio API issue and use Docker for stability
d8ff6a3
raw
history blame contribute delete
518 Bytes
FROM python:3.11-slim
WORKDIR /app
# 安装系统依赖
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
# 安装 Python 依赖
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# 复制应用代码
COPY . .
# 创建用户(HF Spaces 要求)
RUN useradd -m -u 1000 user && \
chown -R user:user /app
USER user
EXPOSE 7860
CMD ["python", "app.py"]