psr commited on
Commit
c018bfc
·
1 Parent(s): d64cba6

docker: add ffmpeg for whisper and general cleanup

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -12
Dockerfile CHANGED
@@ -1,35 +1,37 @@
1
- FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 AS stage1
 
2
  ARG DEBIAN_FRONTEND=noninteractive
3
- ARG TZ=America/Los_Angeles
 
 
 
4
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5
  RUN apt-get update
6
- RUN apt install -y curl wget git
7
  RUN adduser --disabled-password --gecos '' --shell /bin/bash user
8
  USER user
9
  ENV HOME=/home/user
10
  WORKDIR $HOME
11
  RUN mkdir $HOME/.cache $HOME/.config && chmod -R 777 $HOME
12
- RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_23.1.0-1-Linux-x86_64.sh
13
- RUN chmod +x Miniconda3-py39_23.1.0-1-Linux-x86_64.sh
14
- RUN ./Miniconda3-py39_23.1.0-1-Linux-x86_64.sh -b -p /home/user/miniconda
15
  ENV PATH="$HOME/miniconda/bin:$PATH"
16
  RUN conda init
17
- RUN conda install python=3.9.13
18
  RUN python3 -m pip install --upgrade pip
19
  RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
20
 
21
- FROM stage1 AS stage2
22
- RUN mkdir /home/user/ai-voice-cloning
23
- WORKDIR /home/user/ai-voice-cloning
24
  COPY --chown=user:user modules modules
25
 
26
- FROM stage2 AS stage3
27
  RUN python3 -m pip install -r ./modules/tortoise-tts/requirements.txt
28
  RUN python3 -m pip install -e ./modules/tortoise-tts/
29
  RUN python3 -m pip install -r ./modules/dlas/requirements.txt
30
  RUN python3 -m pip install -e ./modules/dlas/
31
  ADD requirements.txt requirements.txt
32
  RUN python3 -m pip install -r ./requirements.txt
33
- ADD --chown=user:user . /home/user/ai-voice-cloning
34
 
35
  CMD ["python", "./src/main.py", "--listen", "0.0.0.0:7680"]
 
1
+ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
2
+
3
  ARG DEBIAN_FRONTEND=noninteractive
4
+ ARG TZ=UTC
5
+ ARG MINICONDA_VERSION=23.1.0-1
6
+ ARG PYTHON_VERSION=3.9.13
7
+
8
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
9
  RUN apt-get update
10
+ RUN apt install -y curl wget git ffmpeg
11
  RUN adduser --disabled-password --gecos '' --shell /bin/bash user
12
  USER user
13
  ENV HOME=/home/user
14
  WORKDIR $HOME
15
  RUN mkdir $HOME/.cache $HOME/.config && chmod -R 777 $HOME
16
+ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_$MINICONDA_VERSION-Linux-x86_64.sh
17
+ RUN chmod +x Miniconda3-py39_$MINICONDA_VERSION-Linux-x86_64.sh
18
+ RUN ./Miniconda3-py39_$MINICONDA_VERSION-Linux-x86_64.sh -b -p /home/user/miniconda
19
  ENV PATH="$HOME/miniconda/bin:$PATH"
20
  RUN conda init
21
+ RUN conda install python=$PYTHON_VERSION
22
  RUN python3 -m pip install --upgrade pip
23
  RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
24
 
25
+ RUN mkdir $HOME/ai-voice-cloning
26
+ WORKDIR $HOME/ai-voice-cloning
 
27
  COPY --chown=user:user modules modules
28
 
 
29
  RUN python3 -m pip install -r ./modules/tortoise-tts/requirements.txt
30
  RUN python3 -m pip install -e ./modules/tortoise-tts/
31
  RUN python3 -m pip install -r ./modules/dlas/requirements.txt
32
  RUN python3 -m pip install -e ./modules/dlas/
33
  ADD requirements.txt requirements.txt
34
  RUN python3 -m pip install -r ./requirements.txt
35
+ ADD --chown=user:user . $HOME/ai-voice-cloning
36
 
37
  CMD ["python", "./src/main.py", "--listen", "0.0.0.0:7680"]