Dockerfile 732 B

12345678910111213
  1. FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
  2. ENV DEBIAN_FRONTEND=noninteractive
  3. WORKDIR /opt/CosyVoice
  4. RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
  5. RUN apt-get update -y
  6. RUN apt-get -y install git unzip git-lfs g++
  7. RUN git lfs install
  8. RUN git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git
  9. # here we use python==3.10 because we cannot find an image which have both python3.8 and torch2.0.1-cu118 installed
  10. RUN cd CosyVoice && pip3 install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com --no-cache-dir
  11. RUN cd CosyVoice/runtime/python/grpc && python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. cosyvoice.proto