mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-09-27 03:48:28 +08:00
Improve docker support
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
.git
|
||||
Dockerfile
|
62
Dockerfile
62
Dockerfile
@@ -1,32 +1,34 @@
|
||||
FROM gnuhub/base-docker
|
||||
MAINTAINER Stallman Wang "gnuhub@gmail.com"
|
||||
from ubuntu:14.04
|
||||
|
||||
ADD /docker/etc/apt/sources.list /etc/apt/sources.list
|
||||
ADD /docker/etc/apt/trusted.gpg /etc/apt/trusted.gpg
|
||||
RUN sudo apt-get update
|
||||
RUN apt-get install -y --force-yes build-essential
|
||||
RUN apt-get install -y m4
|
||||
RUN apt-get install -y flex
|
||||
RUN apt-get install -y bison
|
||||
RUN apt-get install -y gawk
|
||||
RUN apt-get install -y texinfo
|
||||
RUN apt-get install -y autoconf
|
||||
RUN apt-get install -y libtool
|
||||
RUN apt-get install -y pkg-config
|
||||
# Install prerequisites
|
||||
run apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
cmake \
|
||||
curl \
|
||||
git \
|
||||
libcurl3-dev \
|
||||
libleptonica-dev \
|
||||
liblog4cplus-dev \
|
||||
libopencv-dev \
|
||||
libtesseract-dev \
|
||||
wget
|
||||
|
||||
RUN apt-get install -y openssl
|
||||
RUN apt-get install -y curl
|
||||
RUN apt-get install -y libreadline6
|
||||
RUN apt-get install -y git
|
||||
RUN apt-get install -y zlib1g
|
||||
RUN apt-get install -y autoconf
|
||||
RUN apt-get install -y automake
|
||||
RUN apt-get install -y libtool
|
||||
RUN apt-get install -y imagemagick
|
||||
RUN apt-get install -y make
|
||||
RUN apt-get install -y tree
|
||||
RUN apt-get install -y gdb
|
||||
RUN apt-get install -y libopencv-dev libtesseract-dev git cmake build-essential libleptonica-dev
|
||||
RUN apt-get install -y liblog4cplus-dev libcurl3-dev
|
||||
RUN apt-get install -y beanstalkd
|
||||
RUN apt-get install -y wget
|
||||
# Copy all data
|
||||
copy . /srv/openalpr
|
||||
|
||||
# Setup the build directory
|
||||
run mkdir /srv/openalpr/src/build
|
||||
workdir /srv/openalpr/src/build
|
||||
|
||||
# Setup the compile environment
|
||||
run cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..
|
||||
|
||||
# Compile the library
|
||||
run make
|
||||
|
||||
# Install the binaries/libraries to your local system (prefix is /usr)
|
||||
run make install
|
||||
|
||||
workdir /data
|
||||
|
||||
entrypoint ["alpr"]
|
||||
|
11
README.md
11
README.md
@@ -130,6 +130,17 @@ Please follow these detailed compilation guides for your respective operating sy
|
||||
|
||||
If all went well, there should be an executable named *alpr* along with *libopenalpr-static.a* and *libopenalpr.so* that can be linked into your project.
|
||||
|
||||
Docker
|
||||
------
|
||||
|
||||
``` shell
|
||||
# Build docker image
|
||||
docker build -t openalpr https://github.com/openalpr/openalpr.git
|
||||
# Download test image
|
||||
wget http://plates.openalpr.com/h786poj.jpg
|
||||
# Run alpr on image
|
||||
docker run -it --rm -v $(pwd):/data:ro openalpr -c eu h786poj.jpg
|
||||
```
|
||||
|
||||
Questions
|
||||
---------
|
||||
|
@@ -1,35 +0,0 @@
|
||||
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
|
||||
# newer versions of the distribution.
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted
|
||||
|
||||
## Major bug fix updates produced after the final release of the
|
||||
## distribution.
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
|
||||
|
||||
## Uncomment the following two lines to add software from the 'universe'
|
||||
## repository.
|
||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
||||
## team. Also, please note that software in universe WILL NOT receive any
|
||||
## review or updates from the Ubuntu security team.
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty universe
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe
|
||||
|
||||
## N.B. software from this repository may not have been tested as
|
||||
## extensively as that contained in the main release, although it includes
|
||||
## newer versions of some applications which may provide useful features.
|
||||
## Also, please note that software in backports WILL NOT receive any review
|
||||
## or updates from the Ubuntu security team.
|
||||
# deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
|
||||
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
|
||||
deb http://archive.ubuntu.com/ubuntu/ trusty-security universe
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security universe
|
||||
# deb http://archive.ubuntu.com/ubuntu/ trusty-security multiverse
|
||||
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-security multiverse
|
Binary file not shown.
Reference in New Issue
Block a user