Spaces:
Paused
Paused
File size: 925 Bytes
69f864a 35652bb dcc367c 35652bb 194db07 dcc367c 35652bb dcc367c 35652bb dcc367c 35652bb 194db07 35652bb | 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 36 37 38 39 40 41 | FROM python:3.9-slim
# Install system dependencies including FFmpeg, fontconfig, and build tools
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
git-lfs \
fontconfig \
libfontconfig1 \
libfreetype6 \
build-essential \
python3-dev \
gcc \
g++ \
make \
libffi-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
WORKDIR /app
# First upgrade pip and install setuptools
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the app
COPY . .
# Create font directory and set permissions
RUN mkdir -p /usr/share/fonts/custom && \
chmod -R 755 /usr/share/fonts/custom
# Expose the port
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |