Compare commits
1 Commits
d60a7f10f2
...
d815b387b5
Author | SHA1 | Date | |
---|---|---|---|
|
d815b387b5 |
25
Dockerfile
25
Dockerfile
|
@ -19,36 +19,17 @@ RUN python3 -m pip install --upgrade pip
|
||||||
RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
|
RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
|
||||||
|
|
||||||
FROM stage1 AS stage2
|
FROM stage1 AS stage2
|
||||||
USER root
|
|
||||||
RUN mkdir /home/user/ai-voice-cloning
|
RUN mkdir /home/user/ai-voice-cloning
|
||||||
RUN mkdir /home/user/ai-voice-cloning/modules
|
|
||||||
RUN chown -R user:user /home/user/ai-voice-cloning
|
|
||||||
|
|
||||||
USER user
|
|
||||||
WORKDIR /home/user/ai-voice-cloning
|
WORKDIR /home/user/ai-voice-cloning
|
||||||
|
COPY --chown=user:user modules modules
|
||||||
|
|
||||||
ADD .gitmodules .gitmodules
|
|
||||||
ADD .git .git
|
|
||||||
ADD modules modules
|
|
||||||
USER root
|
|
||||||
RUN chown -R user:user /home/user/ai-voice-cloning
|
|
||||||
USER user
|
|
||||||
RUN git config --global --add safe.directory /home/user/ai-voice-cloning
|
|
||||||
RUN git submodule init
|
|
||||||
RUN git submodule update --remote
|
|
||||||
# install TorToiSe requirements
|
|
||||||
RUN python3 -m pip install -r ./modules/tortoise-tts/requirements.txt
|
RUN python3 -m pip install -r ./modules/tortoise-tts/requirements.txt
|
||||||
# install TorToiSe
|
FROM stage2 AS stage3
|
||||||
RUN python3 -m pip install -e ./modules/tortoise-tts/
|
RUN python3 -m pip install -e ./modules/tortoise-tts/
|
||||||
# instal DLAS requirements, last, because whisperx will break a dependency here
|
|
||||||
RUN python3 -m pip install -r ./modules/dlas/requirements.txt
|
RUN python3 -m pip install -r ./modules/dlas/requirements.txt
|
||||||
# install DLAS
|
|
||||||
RUN python3 -m pip install -e ./modules/dlas/
|
RUN python3 -m pip install -e ./modules/dlas/
|
||||||
|
|
||||||
ADD requirements.txt requirements.txt
|
ADD requirements.txt requirements.txt
|
||||||
# install local requirements
|
|
||||||
RUN python3 -m pip install -r ./requirements.txt
|
RUN python3 -m pip install -r ./requirements.txt
|
||||||
|
ADD --chown=user:user . /home/user/ai-voice-cloning
|
||||||
ADD . /home/user/ai-voice-cloning
|
|
||||||
|
|
||||||
CMD ["python", "./src/main.py", "--listen", "0.0.0.0:7680"]
|
CMD ["python", "./src/main.py", "--listen", "0.0.0.0:7680"]
|
4
setup-docker.sh
Executable file
4
setup-docker.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
git submodule init
|
||||||
|
git submodule update --remote
|
||||||
|
docker build -t ai-voice-cloning .
|
14
start-docker.sh
Executable file
14
start-docker.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
CMD="python3 ./src/main.py $@"
|
||||||
|
# CMD="bash"
|
||||||
|
CPATH="/home/user/ai-voice-cloning"
|
||||||
|
docker run --rm --gpus all \
|
||||||
|
--mount "type=bind,src=$PWD/models,dst=$CPATH/models" \
|
||||||
|
--mount "type=bind,src=$PWD/training,dst=$CPATH/training" \
|
||||||
|
--mount "type=bind,src=$PWD/voices,dst=$CPATH/voices" \
|
||||||
|
--mount "type=bind,src=$PWD/bin,dst=$CPATH/bin" \
|
||||||
|
--workdir $CPATH \
|
||||||
|
--user "$(id -u):$(id -g)" \
|
||||||
|
--net host \
|
||||||
|
-it ai-voice-cloning $CMD
|
||||||
|
|
Loading…
Reference in New Issue
Block a user