Spaces:
Paused
Paused
File size: 654 Bytes
403a9a4 1191524 403a9a4 aa15668 1191524 403a9a4 1191524 403a9a4 aa15668 403a9a4 1191524 e70596d 1191524 403a9a4 1191524 |
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 |
# Base image
FROM python:3.10-slim
# Install system packages
RUN apt-get update && apt-get install -y \
git \
ffmpeg \
libsndfile1 \
&& apt-get clean
# Set working directory
WORKDIR /app
# Copy all project files
COPY . .
# Upgrade pip
RUN pip install --upgrade pip
# Install dependencies with CPU-only PyTorch
RUN pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
# Set cache dir for Hugging Face models to avoid /.cache permission errors
ENV TRANSFORMERS_CACHE=/app/cache/huggingface
ENV HF_HOME=/app/cache/huggingface
# Expose port
EXPOSE 7860
# Start the Flask app
CMD ["python", "app.py"]
|