| FROM python:3.10-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| ffmpeg \ |
| libsndfile1 \ |
| libportaudio2 \ |
| git \ |
| build-essential \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| RUN pip install --no-cache-dir torch==2.1.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cpu |
|
|
| |
| RUN git clone --depth 1 https://github.com/IAHispano/Applio.git /app/applio |
|
|
| |
| RUN cd /app/applio && sed -i '/^torch/d' requirements.txt |
|
|
| |
| RUN cd /app/applio && pip install --no-cache-dir -r requirements.txt || true |
|
|
| |
| RUN pip install --no-cache-dir \ |
| numpy==1.24.3 \ |
| faiss-cpu \ |
| torchcrepe \ |
| torchfcpe \ |
| praat-parselmouth \ |
| pyworld \ |
| fairseq==0.12.2 \ |
| huggingface_hub \ |
| edge-tts \ |
| gradio==4.44.1 \ |
| soundfile \ |
| librosa |
|
|
| |
| RUN cd /app/applio && python core.py prerequisites || true |
|
|
| COPY app.py /app/app.py |
|
|
| |
| RUN useradd -m -u 1000 user |
|
|
| |
| RUN mkdir -p /app/temp /app/models && chown -R user:user /app/temp /app/models /app/applio/logs |
|
|
| USER user |
| ENV HOME=/home/user \ |
| PATH=/home/user/.local/bin:$PATH \ |
| GRADIO_SERVER_NAME=0.0.0.0 \ |
| PYTHONPATH=/app/applio:/app/applio/rvc/train |
|
|
| EXPOSE 7860 |
| CMD ["python", "app.py"] |
|
|