Dockfile 安装tensorflow gdal遥感领域

# 基础镜像, cuda为10.2.0/10.1.0,ubuntu18.04
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04

# 配置程序依赖环境
RUN apt-get update && apt-get install -y --no-install-recommends \
         build-essential \
         cmake \
         curl \ 
		 wget \
         ca-certificates \
         libjpeg-dev \
		 libgdal-dev \
         libpng-dev \
         python3 \
         python3-dev \
         python3-pip && \
     rm -rf /var/lib/apt/lists/*

 
# install Anaconda3
RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.10-Linux-x86_64.sh -O ~/anaconda3.sh
RUN bash ~/anaconda3.sh -b -p /home/anaconda3 \
	&& rm ~/anaconda3.sh 
ENV PATH /home/anaconda3/bin:$PATH
 
# change mirror
RUN mkdir ~/.pip \
	&& cd ~/.pip 	
RUN	echo -e "[global]\nindex-url = https://pypi.mirrors.ustc.edu.cn/simple/" >> ~/pip.conf
RUN conda install gdal
RUN /home/anaconda3/bin/pip install --upgrade pip
RUN /home/anaconda3/bin/pip install setuptools
RUN /home/anaconda3/bin/pip install tensorflow-gpu==1.13.2 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install Keras==2.1.5 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install scipy==1.2.1 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install numpy==1.17.0 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install h5py==2.10.0 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install opencv_python==4.1.2.30 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install opencv_python-headless -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install geojson -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install matplotlib==3.1.2 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install tqdm==4.60.0 -i https://mirrors.aliyun.com/pypi/simple
RUN /home/anaconda3/bin/pip install Pillow==8.2.0 -i https://mirrors.aliyun.com/pypi/simple

# 将程序复制到容器内的/work路径下
COPY .  /
#COPY ./weights/best.pt /work/weights/
# 容器启动命令
CMD ["python3", "-u", "/Predict.py"]


你可能感兴趣的:(ubuntu,yolov,系列,maskrcnn,ubuntu,深度学习,视觉检测)