mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 07:06:54 +08:00
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
|
from ubuntu:14.04
|
||||||
MAINTAINER Stallman Wang "gnuhub@gmail.com"
|
|
||||||
|
|
||||||
ADD /docker/etc/apt/sources.list /etc/apt/sources.list
|
# Install prerequisites
|
||||||
ADD /docker/etc/apt/trusted.gpg /etc/apt/trusted.gpg
|
run apt-get update && apt-get install -y \
|
||||||
RUN sudo apt-get update
|
build-essential \
|
||||||
RUN apt-get install -y --force-yes build-essential
|
cmake \
|
||||||
RUN apt-get install -y m4
|
curl \
|
||||||
RUN apt-get install -y flex
|
git \
|
||||||
RUN apt-get install -y bison
|
libcurl3-dev \
|
||||||
RUN apt-get install -y gawk
|
libleptonica-dev \
|
||||||
RUN apt-get install -y texinfo
|
liblog4cplus-dev \
|
||||||
RUN apt-get install -y autoconf
|
libopencv-dev \
|
||||||
RUN apt-get install -y libtool
|
libtesseract-dev \
|
||||||
RUN apt-get install -y pkg-config
|
wget
|
||||||
|
|
||||||
RUN apt-get install -y openssl
|
# Copy all data
|
||||||
RUN apt-get install -y curl
|
copy . /srv/openalpr
|
||||||
RUN apt-get install -y libreadline6
|
|
||||||
RUN apt-get install -y git
|
# Setup the build directory
|
||||||
RUN apt-get install -y zlib1g
|
run mkdir /srv/openalpr/src/build
|
||||||
RUN apt-get install -y autoconf
|
workdir /srv/openalpr/src/build
|
||||||
RUN apt-get install -y automake
|
|
||||||
RUN apt-get install -y libtool
|
# Setup the compile environment
|
||||||
RUN apt-get install -y imagemagick
|
run cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc ..
|
||||||
RUN apt-get install -y make
|
|
||||||
RUN apt-get install -y tree
|
# Compile the library
|
||||||
RUN apt-get install -y gdb
|
run make
|
||||||
RUN apt-get install -y libopencv-dev libtesseract-dev git cmake build-essential libleptonica-dev
|
|
||||||
RUN apt-get install -y liblog4cplus-dev libcurl3-dev
|
# Install the binaries/libraries to your local system (prefix is /usr)
|
||||||
RUN apt-get install -y beanstalkd
|
run make install
|
||||||
RUN apt-get install -y wget
|
|
||||||
|
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.
|
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
|
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.
@@ -115,16 +115,6 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/config/openalpr.conf DESTINATION
|
|||||||
IF (WITH_DAEMON)
|
IF (WITH_DAEMON)
|
||||||
install (TARGETS alprd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
install (TARGETS alprd DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
install (FILES ${CMAKE_SOURCE_DIR}/../config/alprd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/openalpr COMPONENT config)
|
install (FILES ${CMAKE_SOURCE_DIR}/../config/alprd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/openalpr COMPONENT config)
|
||||||
|
|
||||||
install (FILES ${CMAKE_SOURCE_DIR}/../upstart/alprd.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/init COMPONENT config)
|
|
||||||
|
|
||||||
# Ideally, these two files should be owned by the "daemon" user, but cmake does not seem to allow that
|
|
||||||
# Making them world writable as a hack
|
|
||||||
install (FILES ${CMAKE_SOURCE_DIR}/../upstart/alprd.log DESTINATION ${CMAKE_INSTALL_VARDIR}/log
|
|
||||||
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE )
|
|
||||||
install (FILES ${CMAKE_SOURCE_DIR}/../upstart/alprd.pid DESTINATION ${CMAKE_INSTALL_VARDIR}/run
|
|
||||||
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_WRITE WORLD_READ WORLD_WRITE )
|
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user