Spaces:
Runtime error
Runtime error
File size: 963 Bytes
5d1632b ae9046c 0a5957d 5d1632b ae9046c |
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 39 40 41 42 43 44 |
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip to the latest version
RUN pip install --upgrade pip
# Install numpy first (as it's a common dependency)
RUN pip install --no-cache-dir numpy==1.22.0
# Install scipy (depends on numpy)
RUN pip install --no-cache-dir scipy>=1.11.2
# Install torch and torchaudio
RUN pip install --no-cache-dir torch>=2.0.1 torchaudio>=2.0.2
# Install librosa and soundfile
RUN pip install --no-cache-dir librosa>=0.10.1 soundfile>=0.12.1
# Install gradio
RUN pip install --no-cache-dir gradio==4.36.1
# Install TTS last
RUN pip install --no-cache-dir TTS==0.22.0
# Copy application code
COPY app.py .
COPY README.md .
# Create directory for uploaded files
RUN mkdir -p uploads
# Expose port for Gradio
EXPOSE 7860
# Run the application
CMD ["python", "app.py"] |