【收藏】环境配置docker_caffe_python3_ubuntu16.04

FROM ubuntu:16.04


ADD dockerfile/deep_ocr_python3/sources.list /etc/apt/sources.list
RUN apt-get update --fix-missing

# Install dependencies
RUN apt-get install -y --no-install-recommends cmake
RUN apt-get install -y --no-install-recommends git
RUN apt-get install -y --no-install-recommends wget
RUN apt-get install -y --no-install-recommends libatlas-base-dev
RUN apt-get install -y --no-install-recommends libboost-all-dev
RUN apt-get install -y --no-install-recommends libgflags-dev
RUN apt-get install -y --no-install-recommends libgoogle-glog-dev
RUN apt-get install -y --no-install-recommends libhdf5-serial-dev
RUN apt-get install -y --no-install-recommends libleveldb-dev
RUN apt-get install -y --no-install-recommends libopencv-dev
RUN apt-get install -y --no-install-recommends libprotobuf-dev
RUN apt-get install -y --no-install-recommends libsnappy-dev
RUN apt-get install -y --no-install-recommends protobuf-compiler
RUN rm -rf /var/lib/apt/lists/*

## Python3
RUN apt-get update
RUN apt-get install -y python3-dev python3-pip ipython3

ENV CAFFE_ROOT=/opt/caffe
WORKDIR $CAFFE_ROOT

# FIXME: clone a specific git tag and use ARG instead of ENV once DockerHub supports this.
ENV CLONE_TAG=master

RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git .
RUN mkdir ~/.pip && touch ~/.pip/pip.conf
RUN echo "[global]\ntrusted-host =  mirrors.aliyun.com\nindex-url = http://mirrors.aliyun.com/pypi/simple\n" >> ~/.pip/pip.conf
RUN pip3 install --upgrade pip
RUN for req in $(cat python/requirements.txt) pydot; do pip3 install $req; done
ADD dockerfile/deep_ocr_python3/Makefile.config ./Makefile.config
RUN ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python3.so

RUN apt-get install -y liblmdb-dev
RUN ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0 /usr/lib/x86_64-linux-gnu/libhdf5.so
RUN ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.2 /usr/lib/x86_64-linux-gnu/libhdf5_hl.so
RUN ldconfig
RUN make all
RUN make test
RUN make runtest
RUN apt-get install python3-numpy
RUN make pycaffe

ENV PYCAFFE_ROOT $CAFFE_ROOT/python
ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH

RUN pip3 install python-dateutil --upgrade
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

源代码杀手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值