Spaces:
Running
Running
File size: 865 Bytes
ca78350 2b47929 f7bc54e | 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 31 32 33 34 35 | # Use Python 3.11 slim image (matches project requirements)
FROM python:3.11-slim
# Set working directory to app root
WORKDIR /app
# Install system dependencies
# gcc: for compiling some python packages if needed
# ffmpeg: for pydub (audio processing)
# curl, libpq-dev: for postgres/healthchecks
RUN apt-get update && apt-get install -y \
gcc \
ffmpeg \
libpq-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy backend requirements first for caching
COPY backend/requirements.txt ./backend/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir -r backend/requirements.txt
# Copy the entire backend directory
COPY backend ./backend
# Set working directory to backend where app code lives
WORKDIR /app/backend
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Set permissions and run
CMD ["python", "start.py"]
|