syncnet_space / Dockerfile
PoppyPepperPie2894's picture
Upload 35 files
02a797c verified
Raw History Blame Contribute Delete
708 Bytes
# Use Python 3.9
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies (Fixes issues with cv2 and soundfile)
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all your app code
COPY . .
# Create a user (Hugging Face security requirement)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Run the app on port 7860 (Hugging Face Default)
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--timeout", "120"]