RUN sed -i s:/archive.ubuntu.com:/mirrors.aliyun.com/ubuntu:g /etc/apt/sources.list
RUN sed -i s:/archive.ubuntu.com:/mirrors.tuna.tsinghua.edu.cn/ubuntu:g /etc/apt/sources.list
RUN cat /etc/apt/sources.list
RUN apt-get clean
RUN apt-get -y update --fix-missing
RUN pip install pip -U
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --upgrade pip
RUN conda env create -f environment.yml
dockerfile: FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 ADD . /app WORKDIR /app ENV ANACONDA /opt/anaconda3 ENV CUDA_PATH /usr/local/cuda ENV PATH ${ANACONDA}/bin:${CUDA_PATH}/bin:$PATH ENV LD_LIBRARY_PATH ${ANACONDA}/lib:${CUDA_PATH}/bin64:$LD_LIBRARY_PATH ENV C_INCLUDE_PATH ${CUDA_PATH}/include ENV DEBIAN_FRONTEND=noninteractive RUN rm /etc/apt/sources.list.d/cuda.list RUN rm /etc/apt/sources.list.d/nvidia-ml.list
更新源
RUN sed -i s:/archive.ubuntu.com:/mirrors.aliyun.com/ubuntu:g /etc/apt/sources.list
RUN sed -i s:/archive.ubuntu.com:/mirrors.tuna.tsinghua.edu.cn/ubuntu:g /etc/apt/sources.list RUN cat /etc/apt/sources.list RUN apt-get clean RUN apt-get -y update --fix-missing
RUN apt-get install -y --no-install-recommends \ wget \ axel \ imagemagick \ libopencv-dev \ python-opencv \ build-essential \ cmake \ git \ curl \ ca-certificates \ libjpeg-dev \ libpng-dev \ axel \ zip \ pkg-config \ libglvnd0 \ libgl1 \ libglx0 \ libegl1 \ libgles2 \ libglvnd-dev \ libgl1-mesa-dev \ libegl1-mesa-dev \ libgles2-mesa-dev \ unzip RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-5.0.1-Linux-x86_64.sh -P /tmp --no-check-certificate RUN bash /tmp/Anaconda3-5.0.1-Linux-x86_64.sh -b -p $ANACONDA RUN rm /tmp/Anaconda3-5.0.1-Linux-x86_64.sh -rf
RUN conda config --remove channels defaults
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
RUN conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
RUN conda config --set show_channel_urls yes
RUN conda config --set ssl_verify false
RUN conda config --show-sources
RUN pip install pip -U RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple RUN pip install --upgrade pip RUN conda env create -f environment.yml
python test.py --name=test --epoch=20 --img_folder=test_2 run error: [F glutil.cpp:338] eglInitialize() failed Aborted