30 lines
780 B
Docker
30 lines
780 B
Docker
FROM python:3.12-slim
|
|
|
|
# System deps: pdfplumber, ffmpeg for video audio extraction, build tools
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
curl \
|
|
ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install PyTorch (CPU-only for Docker build - will use GPU at runtime if available)
|
|
RUN pip install --no-cache-dir \
|
|
torch torchvision torchaudio \
|
|
--index-url https://download.pytorch.org/whl/cpu
|
|
|
|
# Install remaining Python dependencies
|
|
COPY app/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY app/ .
|
|
|
|
EXPOSE 8899
|
|
|
|
VOLUME ["/app/data", "/app/logs"]
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8899", "--log-level", "info"]
|