diff --git a/voice_conversion/rvc-v2-brandon/.gitignore b/voice_conversion/rvc-v2-brandon/.gitignore index 630c32e..1b29b6e 100644 --- a/voice_conversion/rvc-v2-brandon/.gitignore +++ b/voice_conversion/rvc-v2-brandon/.gitignore @@ -5,3 +5,9 @@ __pycache__ hubert_base.pt /logs .venv + +# NB(bt): Local testing +python/ +inputs/ +outputs/ + diff --git a/voice_conversion/rvc-v2-brandon/Dockerfile b/voice_conversion/rvc-v2-brandon/Dockerfile index 49f62d5..85ad9f4 100644 --- a/voice_conversion/rvc-v2-brandon/Dockerfile +++ b/voice_conversion/rvc-v2-brandon/Dockerfile @@ -1,13 +1,46 @@ # syntax=docker/dockerfile:1 -FROM python:3.10-bullseye +#FROM python:3.10-bullseye +FROM nvidia/cuda:12.0.1-runtime-ubuntu22.04 -EXPOSE 7865 +ENV DEBIAN_FRONTEND=noninteractive -WORKDIR /app +# NB: ffmpeg for transcoding opus -> wav +# NB(bt,2023-05-04): Installing lsof, htop, ripgrep, and other debugging tools +# NB(bt,2023-05-04): Installing rsync to monitor time it takes for files to sync +RUN apt-get update && apt-get install -y \ + build-essential \ + curl \ + ffmpeg \ + htop \ + libsndfile1 \ + lsof \ + nvidia-driver-515 \ + python3-pip \ + python3.10 \ + python3.10-dev \ + python3.10-venv \ + ripgrep \ + rsync \ + vim \ + wget \ + --no-install-recommends \ + && apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/{apt,dpkg,cache,log}/ + +RUN mkdir /python_install +RUN mkdir /model_code + +WORKDIR /python_install + +COPY requirements.txt . + +# NB: Kubernetes will copy over the venv we create here. +RUN python3 -m venv python \ + && . python/bin/activate \ + && pip install wheel \ + && pip install -r requirements.txt + +# NB: The model code is uploaded next +WORKDIR /model_code COPY . . - -RUN pip3 install -r requirements.txt - -CMD ["python3", "infer-web.py"] \ No newline at end of file diff --git a/voice_conversion/rvc-v2-brandon/requirements.txt b/voice_conversion/rvc-v2-brandon/requirements.txt index 92bbe60..e2d09be 100644 --- a/voice_conversion/rvc-v2-brandon/requirements.txt +++ b/voice_conversion/rvc-v2-brandon/requirements.txt @@ -36,7 +36,12 @@ absl-py>=1.2.0 audioread uvicorn>=0.21.1 colorama>=0.4.5 -pyworld>=0.3.2 +# NB(bt, 2023-07-18): This issue literally just cropped up with PyWorld: +# Docker images were building yesterday, but not today. Downgrade +# pyworld>=0.3.2 to pyworld==0.3.2. (Granted, 0.3.3 was released back in +# April.) +# https://github.com/gitmylo/audio-webui/issues/78 +pyworld==0.3.2 httpx==0.23.0 #onnxruntime-gpu torchcrepe==0.0.20