PaddleSpeech nltk_data error: zip file not exists

解决:在官方网站上下载到本地后打入镜像。

 

Dockfile如下:

FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu18.04
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
  echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >/etc/apt/sources.list && \
  echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list && \
  echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >>/etc/apt/sources.list
RUN apt-get update && \
  apt-get install -y libsndfile1-dev zlib* libffi-dev curl wget vim git unzip unrar && \
  apt-get install -y python3.8 python3.8-dev python3-pip tar xz-utils openssl libssl-dev bzip2 gzip net-tools libgl1 && \
  apt-get purge -y --auto-remove

ADD . /home/PaddleSpeech/
ENV WAVPATH /home/PaddleSpeech/TestAudio/

RUN python3.8 -m pip install --upgrade pip -i https://mirror.baidu.com/pypi/simple && \
  python3.8 -m pip install --upgrade setuptools -i https://mirror.baidu.com/pypi/simple && \
  python3.8 -m pip install web.py paddlespeech_ctcdecoders pytest-runner -i https://mirror.baidu.com/pypi/simple

RUN cd /home/PaddleSpeech/ && \
  tar -zvxf nltk_data.tar.gz -C /root/ && \
  python3.8 -m pip install paddlepaddle_gpu-2.4.1.post112-cp38-cp38-linux_x86_64.whl -i https://mirror.baidu.com/pypi/simple && \
  python3.8 -m pip install . -i https://mirror.baidu.com/pypi/simple

ENTRYPOINT ["/bin/bash","-c","/home/PaddleSpeech/run.sh"]

posted @ 2023-03-13 14:39  angry_gladiator  阅读(131)  评论(0编辑  收藏  举报