File size: 760 Bytes
c7e434a |
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 |
# Hugging Face Spaces - Single Container Dockerfile
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies including Redis
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
git \
redis-server \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Download smaller Whisper model for HF Spaces
RUN python -c "import whisper; whisper.load_model('base')"
# Copy application code
COPY . .
# Create uploads directory
RUN mkdir -p uploads
# Make start script executable
RUN chmod +x start.sh
# Expose Hugging Face Spaces port
EXPOSE 7860
# Start script (Redis + Worker + API)
CMD ["./start.sh"]
|