加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 2.54 KB
一键复制 编辑 原始数据 按行查看 历史
lbeaucourt 提交于 2020-02-10 21:22 . Fixe tools versions for v1
FROM ubuntu:16.04
# Install system packages (python 3.5)
RUN apt-get -qq update && apt-get -qq install --no-install-recommends -y python3.5 \
python3-dev \
python-pil \
python-lxml \
python-tk \
build-essential \
cmake \
git \
libgtk2.0-dev \
pkg-config \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libdc1394-22-dev \
x11-apps \
wget \
vim \
ffmpeg \
unzip \
libcanberra-gtk-module \
&& rm -rf /var/lib/apt/lists/*
# Install core packages (TF v1.15.2)
RUN wget -q -O /tmp/get-pip.py --no-check-certificate https://bootstrap.pypa.io/get-pip.py && python3 /tmp/get-pip.py
RUN pip install -U pip \
numpy \
matplotlib \
notebook \
jupyter \
pandas \
moviepy \
tensorflow==1.15.2 \
keras \
autovizwidget
# Install tensorflow models object detection
RUN GIT_SSL_NO_VERIFY=true git clone -q https://github.com/tensorflow/models /usr/local/lib/python3.5/dist-packages/tensorflow/models
# Download & build protobuf-python 3.5.1
RUN wget -q -P /usr/local/src/ --no-check-certificate https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-python-3.5.1.tar.gz \
&& cd /usr/local/src/ \
&& tar xf protobuf-python-3.5.1.tar.gz \
&& rm protobuf-python-3.5.1.tar.gz \
&& cd /usr/local/src/protobuf-3.5.1/ \
&& ./configure \
&& make \
&& make install \
&& ldconfig \
&& rm -rf /usr/local/src/protobuf-3.5.1/
# Add dataframe display widget
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
# Download & build OpenCV 3.4.1
RUN wget -q -P /usr/local/src/ --no-check-certificate https://github.com/opencv/opencv/archive/3.4.1.zip
RUN cd /usr/local/src/ \
&& unzip 3.4.1.zip \
&& rm 3.4.1.zip \
&& cd /usr/local/src/opencv-3.4.1/ \
&& mkdir build \
&& cd /usr/local/src/opencv-3.4.1/build \
&& cmake -D CMAKE_INSTALL_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/ .. \
&& make -j4 \
&& make install \
&& rm -rf /usr/local/src/opencv-3.4.1
# Setting up working directory
RUN mkdir /lab
WORKDIR /lab
#ADD . /lab/
# Minimize image size
RUN (apt-get autoremove -y; \
apt-get autoclean -y)
# Set TF object detection available
ENV PYTHONPATH "$PYTHONPATH:/usr/local/lib/python3.5/dist-packages/tensorflow/models/research:/usr/local/lib/python3.5/dist-packages/tensorflow/models/research/slim"
RUN cd /usr/local/lib/python3.5/dist-packages/tensorflow/models/research && protoc object_detection/protos/*.proto --python_out=.
CMD bash exec.sh
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化