-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (35 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM resin/raspberrypi3-python:2.7
ENV INITSYSTEM on
# Install dependencies needed for building and running OpenCV
RUN apt-get update && apt-get install -y --no-install-recommends \
# to build and install
unzip \
build-essential cmake pkg-config \
# to work with images
libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev \
# to work with videos
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
# needed by highgui tool
libgtk2.0-dev \
# for opencv math operations
libatlas-base-dev gfortran \
# cleanup
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -y autoremove
# Install python packages
RUN pip install --no-cache-dir \
# OpenCV dependency
numpy \
# other usefull stuff
ipython \
# cleanup
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# Install OpenCV
COPY download_build_install_opencv.sh download_build_install_opencv.sh
RUN chmod +x download_build_install_opencv.sh \
./download_build_install_opencv.sh