File size: 3,748 Bytes
5a12a67
 
f6faa10
b683940
5a12a67
 
a109a3a
 
5a12a67
 
 
 
 
165b0e4
6e8bc67
165b0e4
6e8bc67
a03f3c7
6e8bc67
a03f3c7
 
5a12a67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3b4ea36
c0b232f
5a12a67
 
 
 
 
 
 
 
 
 
 
 
 
f6faa10
 
b683940
 
 
c6ac82c
 
6e63fb6
ab73c49
c1b9ec6
993fe71
 
1d61e4f
ab73c49
 
a361af5
479aeb4
 
b36a9ad
 
2e56d5d
f6faa10
27b157c
5a12a67
 
 
3ee0104
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# syntax=docker/dockerfile:1

FROM ubuntu:20.04


EXPOSE 7865
RUN apt-get update && \
    apt-get install -y git
# Clone the repository
RUN git clone https://github.com/Render-AI/cog-rvc-training.git /app/cog-rvc-training

COPY . .

# タイムゾーン環境変数を設定
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC

RUN apt-get update && \
    apt-get install -y -qq ffmpeg aria2 tzdata && \
    echo "Etc/UTC" > /etc/timezone && \
    ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
    dpkg-reconfigure --frontend noninteractive tzdata && \
    apt-get install -y software-properties-common && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Add the deadsnakes PPA to get Python 3.9
RUN add-apt-repository ppa:deadsnakes/ppa

# Install Python 3.9 and pip
RUN apt-get update && \
    apt-get install -y build-essential python-dev python3-dev python3.9-distutils python3.9-dev python3.9 curl && \
    apt-get clean && \
    update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
    curl https://bootstrap.pypa.io/get-pip.py | python3.9

# Set Python 3.9 as the default
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
WORKDIR /app/cog-rvc-training
RUN python3 -m pip install --upgrade pip==23.3
RUN python3 -m pip install --no-cache-dir -r requirements.txt

RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d assets/pretrained_v2/ -o D40k.pth
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/G40k.pth -d assets/pretrained_v2/ -o G40k.pth
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0D40k.pth -d assets/pretrained_v2/ -o f0D40k.pth
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/f0G40k.pth -d assets/pretrained_v2/ -o f0G40k.pth

RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2-人声vocals+非人声instrumentals.pth -d assets/uvr5_weights/ -o HP2-人声vocals+非人声instrumentals.pth
RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d assets/uvr5_weights/ -o HP5-主旋律人声vocals+其他instrumentals.pth

RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d assets/hubert -o hubert_base.pt

RUN aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt -d assets/rmvpe -o rmvpe.pt
RUN pip uninstall librosa numba -y
RUN pip install librosa==0.8.1 numba==0.53.1
RUN mkdir -m 777 /tmp/NUMBA_CACHE_DIR /tmp/MPLCONFIGDIR
ENV NUMBA_CACHE_DIR=/tmp/NUMBA_CACHE_DIR/
ENV MPLCONFIGDIR=/tmp/MPLCONFIGDIR/
RUN mkdir -p configs/v1/
#RUN mkdir configs/v1/32k.json -p
RUN chmod 777 configs/v1/40k.json
RUN chmod 777 configs/v1/32k.json
RUN chmod 777 configs/v1/48k.json
RUN chmod 777 configs/v2/32k.json
RUN chmod 777 configs/v1/40k.json
RUN chmod 777 configs/v2/48k.json
RUN chmod 777 configs/v1/
RUN chmod 777 configs/
RUN chmod 777 infer/modules/train/preprocess.py
RUN mkdir TEMP/
RUN chmod 777 TEMP/
RUN mkdir assets/weights/
RUN chmod 777 assets/weights/
USER root

RUN python3 -c "import numba; numba.config.DISABLE_JIT = True; import librosa"

VOLUME [ "/app/weights", "/app/opt" ]

CMD ["python3", "infer-web.py"]