-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (33 loc) · 1.06 KB
/
Dockerfile
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
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 AS base
RUN apt-get update && apt-get install -y \
ffmpeg \
tar \
wget \
git \
bash \
vim
# Install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
ENV PATH="/root/miniconda3/bin:${PATH}"
# Install requirements
RUN conda config --add channels conda-forge && \
conda config --set channel_priority strict
RUN conda create -y -n cosyvoice python=3.8
ENV CONDA_DEFAULT_ENV=cosyvoice
ENV PATH="/root/miniconda3/bin:/opt/conda/envs/cosyvoice/bin:${PATH}"
RUN git clone https://github.com/FunAudioLLM/CosyVoice.git /root/CosyVoice
WORKDIR /root/CosyVoice
RUN git submodule update --init --recursive
RUN pip install -r requirements.txt
# Set environment variables
ENV PYTHONPATH=third_party/Matcha-TTS
ENV API_HOST=0.0.0.0
ENV API_PORT=8080
# Run
COPY download_model.py .
RUN python download_model.py
COPY api.py .
CMD ["python", "api.py"]