前提
WSL2のUbuntu20.04において、DockerでESPnetというツールの環境構築を行っています。
実現したいこと
以下のDockerfileを用いて、環境構築しています。
52行目の「make TH_VERSION=1.10.1 && \」において、condaでpytorchなどをインストールしているのですが、タイムアウトしてしまい、インストールが完了しません。
38行目の「echo -e "remote_read_timeout_secs: 1000" >> /opt/anaconda3/.condarc」でタイムアウト時間を設定しているつもりなのですが、どうやら設定が効いてないようです。
タイムアウトせずに、インストールを完了させたいです。
Dockerfike
1FROM nvidia/cuda:11.3.0-devel-ubuntu20.04 2 3#Proxy Settings 4ENV http_proxy http://hogehoge.co.jp:8080 5ENV https_proxy http://hogehoge.co.jp:8080 6ENV PIP_DEFAULT_TIMEOUT=1000 7 8#setting timezone 9ENV TZ=Asia/Tokyo 10RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 11 12RUN mv /var/lib/apt/lists ~/ 13 14#set timeout for apt 15RUN /bin/echo -e "Acquire::http::Timeout \"300\";\n\ 16Acquire::ftp::Timeout \"300\";" >> /etc/apt/apt.conf.d/99timeout 17 18RUN apt update && apt install -y tzdata 19 20RUN apt install -y build-essential && \ 21 apt install -y software-properties-common && \ 22 apt install -y cmake sox ffmpeg flac curl git man unzip vim wget sudo && \ 23 apt install -y python3 python3-pip && \ 24 apt install -y libfreetype6 libfreetype6-dev pkg-config python3-distutils 25 26#install Anaconda 27RUN \ 28 apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 wget -y && \ 29 wget -P /opt https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh && \ 30 bash /opt/Anaconda3-2021.11-Linux-x86_64.sh -b -p /opt/anaconda3 && \ 31 rm /opt/Anaconda3-2021.11-Linux-x86_64.sh && \ 32 echo "export PATH="/opt/anaconda3/bin:$PATH"" >> ~/.bashrc && \ 33 . ~/.bashrc && \ 34 conda init 35 36#Anaconda settings 37RUN \ 38 echo -e "remote_read_timeout_secs: 1000" >> /opt/anaconda3/.condarc 39 40#RUN \ 41# apt purge -y python3-pip && \ 42# wget https://bootstrap.pypa.io/get-pip.py && \ 43# python3 ./get-pip.py && \ 44# apt install -y python3-pip 45 46#install espnet 47RUN \ 48 cd ~ && \ 49 git clone https://github.com/espnet/espnet && \ 50 cd ~/espnet/tools && \ 51 ./setup_anaconda.sh anaconda espnet 3.8 && \ 52 make TH_VERSION=1.10.1 && \ 53 . ./activate_python.sh; python3 check_install.py
発生している問題・エラーメッセージ
コンソールには、以下のように表示されています。
Downloading and Extracting Packages intel-openmp-2021.4. | 4.2 MB | ########## | 100% blas-1.0 | 6 KB | ########## | 100% mkl_random-1.2.2 | 308 KB | ########## | 100% numpy-base-1.23.1 | 5.6 MB | ########## | 100% torchaudio-0.10.1 | 4.5 MB | ########## | 100% cudatoolkit-11.3.1 | 549.3 MB | ########## | 100% mkl-2021.4.0 | 142.6 MB | ########## | 100% libuv-1.40.0 | 736 KB | ########## | 100% six-1.16.0 | 18 KB | ########## | 100% pytorch-1.10.1 | 1.21 GB | ## | 21% mkl_fft-1.3.1 | 180 KB | ########## | 100% pytorch-mutex-1.0 | 3 KB | ########## | 100% numpy-1.23.1 | 11 KB | ########## | 100% typing_extensions-4. | 42 KB | ########## | 100% mkl-service-2.4.0 | 59 KB | ########## | 100% CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/linux-64/pytorch-1.10.1-py3.8_cuda11.3_cudnn8.2.0_0.tar.bz2> Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. make: *** [Makefile:99: pytorch.done] Error 1 Traceback (most recent call last): File "check_install.py", line 12, in <module> from packaging.version import parse ModuleNotFoundError: No module named 'packaging'
試したこと
該当箇所(52行目の「make TH_VERSION=1.10.1 && \」)をコメントアウトし、buildを完了した後でコンテナに入ってコマンドを実行すると、タイムアウトせずにインストールが完了しました。
あなたの回答
tips
プレビュー