Skip to content

Commit

Permalink
fixes some compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
akofman committed Jul 21, 2017
1 parent f642561 commit c497631
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
35 changes: 21 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ FROM python:3.6.1-alpine
MAINTAINER Alexis Kofman <[email protected]>

ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \
CC="/usr/bin/clang" \
CXX="/usr/bin/clang++" \
SRC="/usr/local" \
OPENCV_VERSION="3.2.0" \
FFMPEG_VERSION="3.3.2" \
Expand All @@ -28,21 +26,20 @@ ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \
FREETYPE_SHA256SUM="5d03dd76c2171a7601e9ce10551d52d4471cf92cd205948e60289251daddffa8 freetype-2.5.5.tar.gz" \
LIBVIDSTAB_SHA256SUM="14d2a053e56edad4f397be0cb3ef8eb1ec3150404ce99a426c4eb641861dc0bb v1.1.0.tar.gz"

## INSTALL FFMPEG https://ffmpeg.org

RUN apk update && apk upgrade && \
buildDeps="autoconf \
automake \
bash \
binutils \
bzip2 \
clang \
clang-dev \
cmake \
curl \
coreutils \
g++ \
gcc \
libtool \
linux-headers \
make \
openssl-dev \
tar \
Expand Down Expand Up @@ -182,7 +179,7 @@ RUN apk update && apk upgrade && \
make install && \
rm -rf ${DIR} && \
#RUN \
## ffmpeg https://ffmpeg.org
## ffmpeg
DIR=$(mktemp -d) && cd ${DIR} && \
curl -sLO https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \
tar -zx --strip-components=1 -f ffmpeg-${FFMPEG_VERSION}.tar.gz && \
Expand Down Expand Up @@ -225,18 +222,26 @@ RUN apk update && apk upgrade && \
make qt-faststart && \
cp qt-faststart ${SRC}/bin && \
rm -rf ${DIR} && \
#RUN \
# OpenCV depends on Numpy. It represents images as NumPy arrays, so we need to install NumPy :

## INSTALL OPENCV http://opencv.org

#RUN \
opencvDeps="clang \
clang-dev \
linux-headers" && \
apk add --update ${opencvDeps} && \
export CC="/usr/bin/clang" && \
export CXX="/usr/bin/clang++" && \
# OpenCV depends on NumPy. It represents images as NumPy arrays, so we need to install NumPy
pip3 install numpy && \
ldconfig && \
#RUN \
# opencv http://opencv.org
#RUN \
## opencv
DIR=$(mktemp -d) && cd ${DIR} && \
curl -sLO https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.tar.gz && \
tar xzvf ${OPENCV_VERSION}.tar.gz && \
cd opencv-${OPENCV_VERSION} && \
mkdir build && \
cd build && \
mkdir build && cd build && \
export MAKEFLAGS="-j$(($(grep -c ^processor /proc/cpuinfo) + 1))" && \
cmake -D BUILD_opencv_python3=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D INSTALL_C_EXAMPLES=OFF \
Expand All @@ -248,8 +253,10 @@ RUN apk update && apk upgrade && \
cp ${DIR}/opencv-${OPENCV_VERSION}/build/lib/python3/cv2.cpython-36m-x86_64-linux-gnu.so /usr/local/lib/python3.6/cv2.so && \
rm -rf ${DIR} && \

# cleanup
## CLEANUP

cd && \
apk del ${buildDeps} && \
apk del ${opencvDeps} && \
rm -rf /var/cache/apk/* /usr/local/include && \
ffmpeg -buildconf
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![ffmpeg](https://img.shields.io/badge/ffmpeg-v3.3.2-blue.svg)](https://ffmpeg.org)
[![ffmpeg](https://img.shields.io/badge/opencv-v3.2.0-blue.svg)](http://opencv.org)

Provides a small Docker image (~100MB) intended for video processing.
Provides a Docker image intended for video processing.

It includes:
- [Python](https://www.python.org)
Expand All @@ -16,12 +16,12 @@ FFMPEG and OpenCV are compiled from sources.

## Installation
```
$ docker pull akofman/video-processing:latest
$ docker pull alexiskofman/video-processing:latest
```

Then enjoy what's inside:
```
$ docker run --rm -ti akofman/video-processing:latest ash
$ docker run --rm -ti alexiskofman/video-processing:latest ash
```

# License
Expand Down

0 comments on commit c497631

Please sign in to comment.