voiceforge / Dockerfile
lordofgaming
Force cache invalidation for fresh build
de57a5d
# CPU-only base for free-tier HuggingFace Spaces
# VoiceForge HuggingFace Docker - Build: 2026-02-01T16:00
FROM python:3.10-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3-pip \
python3-dev \
ffmpeg \
libsndfile1 \
git \
supervisor \
pkg-config \
build-essential \
libavformat-dev \
libavcodec-dev \
libavdevice-dev \
libavutil-dev \
libswscale-dev \
libswresample-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install (files are at root level in HF Space)
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Create directory for weights and logs
RUN mkdir -p backend/app/models/weights /var/log/supervisor
# Copy supervisor config (file is at root level in HF Space)
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose ports (HF expects the app on 7860)
EXPOSE 7860
# Run supervisor to start both backend and frontend
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]