Dongwon Kim commited on
Commit
c6b16c0
·
1 Parent(s): c901a12

Add dockerfile for python 3.8, cuda 11.8 and torch 2.0.1 version

Browse files
Files changed (1) hide show
  1. docker/Dockerfile +51 -0
docker/Dockerfile ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
2
+
3
+ ARG VENV_NAME="cosyvoice"
4
+ ENV VENV=$VENV_NAME
5
+ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
6
+
7
+ ENV DEBIAN_FRONTEN=noninteractive
8
+ ENV PYTHONUNBUFFERED=1
9
+ SHELL ["/bin/bash", "--login", "-c"]
10
+
11
+ RUN apt-get update -y --fix-missing
12
+ RUN apt-get install -y git build-essential curl wget ffmpeg unzip git git-lfs sox libsox-dev && \
13
+ apt-get clean && \
14
+ git lfs install
15
+
16
+ # ==================================================================
17
+ # conda install and conda forge channel as default
18
+ # ------------------------------------------------------------------
19
+ # Install miniforge
20
+ RUN wget --quiet https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O ~/miniforge.sh && \
21
+ /bin/bash ~/miniforge.sh -b -p /opt/conda && \
22
+ rm ~/miniforge.sh && \
23
+ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
24
+ echo "source /opt/conda/etc/profile.d/conda.sh" >> /opt/nvidia/entrypoint.d/100.conda.sh && \
25
+ echo "source /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
26
+ echo "conda activate ${VENV}" >> /opt/nvidia/entrypoint.d/110.conda_default_env.sh && \
27
+ echo "conda activate ${VENV}" >> $HOME/.bashrc
28
+
29
+ ENV PATH /opt/conda/bin:$PATH
30
+
31
+ RUN conda config --add channels conda-forge && \
32
+ conda config --set channel_priority strict
33
+ # ------------------------------------------------------------------
34
+ # ~conda
35
+ # ==================================================================
36
+
37
+ RUN conda create -y -n ${VENV} python=3.8
38
+ ENV CONDA_DEFAULT_ENV=${VENV}
39
+ ENV PATH /opt/conda/bin:/opt/conda/envs/${VENV}/bin:$PATH
40
+
41
+ WORKDIR /workspace
42
+
43
+ ENV PYTHONPATH="${PYTHONPATH}:/workspace/CosyVoice:/workspace/CosyVoice/third_party/Matcha-TTS"
44
+
45
+ RUN git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
46
+
47
+ RUN conda activate ${VENV} && conda install -y -c conda-forge pynini==2.1.5
48
+ RUN conda activate ${VENV} && cd CosyVoice && \
49
+ pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
50
+
51
+ WORKDIR /workspace/CosyVoice