-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 822 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# syntax=docker/dockerfile:1
FROM python:3.12-slim AS base
# Set a non-root user later if you want; for now root is okay for dev/demo
WORKDIR /app
# Install system dependencies required for Weekend 5 features
# - ffmpeg: Required for moviepy to extract audio from videos
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN pip install --no-cache-dir uv
# Copy project files (minimal set)
COPY pyproject.toml uv.lock README.md /app/
COPY src /app/src
# Install dependencies + project
RUN uv sync --frozen --no-dev
# Expose uv's virtualenv
ENV VIRTUAL_ENV=/app/.venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Default command: run the FastAPI app with uvicorn
CMD ["uvicorn", "bharatrag.main:app", "--host", "0.0.0.0", "--port", "8000"]