Spaces:
Sleeping
Sleeping
File size: 839 Bytes
9466e7d | 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 | # Use a slim Python image for a smaller footprint
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
# We include ffmpeg just in case you want to expand audio processing later
RUN apt-get update && apt-get install -y \
build-essential \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY . .
# Set environment variables
# HF Spaces uses 7860 by default
ENV PORT=7860
ENV PYTHONUNBUFFERED=1
# Expose the port
EXPOSE 7860
# Command to run the Quart application
# We use '0.0.0.0' so it's accessible externally within the container network
CMD ["python", "app.py"] |