23 lines
497 B
Docker
23 lines
497 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# 安装系统依赖
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# 安装 Python 依赖
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# 复制后端代码
|
|
COPY app/ ./app/
|
|
|
|
# 创建必要目录
|
|
RUN mkdir -p /app/uploads/transcripts /app/uploads/persons /app/exports /app/data
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|