clipforge / Dockerfile
clove1002's picture
Fix: Force Docker cache bust to deploy new downloader
65fd61f
Raw
History Blame Contribute Delete
969 Bytes
# Build 2026-03-14
FROM python:3.10-bullseye
# Install system dependencies: ffmpeg + fonts for ASS captions
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
fonts-liberation \
fonts-dejavu-core \
ca-certificates \
curl \
aria2 \
iputils-ping \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user (HuggingFace requirement)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /home/user/app
# Install Python dependencies
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip certifi && \
pip install --no-cache-dir curl-cffi && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY --chown=user . .
# Create working directories
RUN mkdir -p uploads outputs
# HuggingFace Spaces requires port 7860
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]