Spaces:
Build error
Build error
| FROM python:3.9-slim | |
| # Install necessary system packages, including wget | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| gcc g++ \ | |
| ffmpeg \ | |
| fontconfig \ | |
| wget \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up working directory | |
| WORKDIR /app | |
| # Clone the repository | |
| RUN git clone https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git . | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip==23.1 \ | |
| && pip install librosa==0.9.2 numba==0.55.2 llvmlite==0.38.0 \ | |
| && pip install -r requirements.txt | |
| # Ensure the hubert_base.pt model exists | |
| RUN mkdir -p assets/hubert \ | |
| && wget -O assets/hubert/hubert_base.pt "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt?download=true" | |
| # Adjust permissions | |
| RUN chmod -R 777 /app | |
| # Ensure Matplotlib and Fontconfig have writable cache directories | |
| RUN mkdir -p /tmp/matplotlib /tmp/fontconfig /app/TEMP && chmod -R 777 /tmp /app/TEMP | |
| ENV MPLCONFIGDIR=/tmp/matplotlib | |
| ENV FONTCONFIG_PATH=/tmp/fontconfig | |
| # Environment variables for numba | |
| ENV NUMBA_CACHE_DIR=/tmp/numba_cache | |
| ENV NUMBA_DISABLE_JIT=1 | |
| # Set up output directory inside the container | |
| RUN mkdir -p /app/outputwav && chmod 777 /app/outputwav | |
| RUN mkdir -p /home/deb12/Desktop/ai/audio/myvoice/outputwav | |
| RUN chmod 777 /home/deb12/Desktop/ai/audio/myvoice/outputwav | |
| RUN mv /app/logs/ьнмщшсу5 /app/logs/myvoice5 | |
| # Run the application | |
| CMD ["python", "infer-web.py"] | |