Spaces:
Sleeping
Sleeping
File size: 1,128 Bytes
735a97b cc2ca49 735a97b c25d615 ce129aa 735a97b ce0dddc 735a97b a6270eb 735a97b | 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 42 43 44 45 46 47 48 49 | # TrendClip Video Composer Server
# FastAPI server for scene selection and video composition
FROM python:3.11-slim
# Set working directory
WORKDIR /app/composer
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
python3-dev \
ffmpeg \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements_server.txt .
# Install Python dependencies with numpy fix
RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir --upgrade numpy==2.0.0
RUN pip install --no-cache-dir -r requirements_server.txt
# Copy application files
COPY server.py .
COPY composer_v2.py .
# Copy assets (fonts, etc.)
COPY asset/ asset/
# Copy static files (UI)
COPY static/ static/
# Create necessary directories
RUN mkdir -p selected candidates renders upload_candidates
# Expose port
EXPOSE 7860
# Environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=utf-8
# Run server with uvicorn
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|