Commit 89326310 authored by Clément Démoulins's avatar Clément Démoulins
Browse files

Source to make a docker image with olena demos

parent cd2335a4
Acquire::http { Proxy "http://192.168.100.254:3142"; };
FROM debian:jessie
LABEL maintainer "Clément Démoulins <demoulins@lrde.epita.fr>"
COPY sources.list /etc/apt/sources.list
COPY 02proxy /etc/apt/apt.conf.d/02proxy
# install build dependencies
RUN apt-get update \
&& RUNLEVEL=1 DEBIAN_FRONTEND=noninteractive \
apt-get install -y --force-yes --no-install-recommends -t jessie-backports \
autoconf \
automake \
autotools-dev \
bibtex2html \
build-essential \
ccache \
cmake \
doxygen \
g++ \
gcc \
ghostscript \
git \
graphicsmagick-libmagick-dev-compat \
graphviz \
hevea \
imagemagick \
latex2html \
libgraphicsmagick++1-dev \
libleptonica-dev \
libmagickcore-extra \
libtesseract-dev \
libtool-bin \
libboost-all-dev \
libtbb-dev \
locales \
lsb-release \
make \
pkg-config \
python-docutils \
qt4-qmake \
libqt4-dev \
tesseract-ocr-eng \
tesseract-ocr-fra \
texlive-full \
wget \
apache2 \
libapache2-mod-php5 \
&& apt-get autoremove \
&& apt-get clean \
&& sed -i 's/# \+\(en_US.UTF.*\)/\1/' /etc/locale.gen \
&& locale-gen
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# RUN wget https://www.lrde.epita.fr/dload/olena/2.1/olena-2.1.tar.bz2 \
# && tar -xjf olena-2.1.tar.bz2 \
# && cd olena-2.1 \
# && ./configure \
# --enable-verbose \
# --enable-scribo \
# --enable-apps \
# --enable-tools \
# && make -j6 \
# && make install
RUN git clone git://git.lrde.epita.fr/olena.git \
&& cd olena \
&& ./bootstrap \
&& ./configure \
--enable-verbose \
--enable-scribo \
--enable-apps \
--enable-tools \
&& sed -ri '252{/mln/d}' scribo/scribo/toolchain/internal/text_in_picture_functor.hh \
&& make -j6 \
&& make install
RUN git clone https://gitlab.lrde.epita.fr/olena/olena-demos.git \
&& cd /olena-demos/src/energy_estimator \
&& CPPFLAGS=$(pkg-config --cflags --libs GraphicsMagick++) make tos_object_segmentation \
&& mv tos_object_segmentation /usr/local/bin/ \
&& cd /olena-demos/src/region_adjacency_graph \
&& CPPFLAGS=$(pkg-config --cflags --libs GraphicsMagick++) make region_adjacency_graph \
&& mv region_adjacency_graph /usr/local/bin/ \
&& cd /olena-demos/src/shape_morphology \
&& CPPFLAGS=$(pkg-config --cflags --libs GraphicsMagick++) make mintree_filter_exe_online \
&& CPPFLAGS=$(pkg-config --cflags --libs GraphicsMagick++) make tos_filter_exe_online \
&& mv mintree_filter_exe_online tos_filter_exe_online /usr/local/bin/ \
&& cd /olena-demos/src/staff_removal \
&& CPPFLAGS=$(pkg-config --cflags --libs GraphicsMagick++) make staff_removal \
&& mv staff_removal /usr/local/bin/ \
&& mv /olena/scribo/src/contest/hdlac-2011/content_in_hdoc_hdlac /usr/local/bin/
EXPOSE 80
COPY apache.conf /etc/apache2/sites-available/000-default.conf
COPY config.php /olena-demos/www/olena/demos/inc/config.php
RUN mkdir /olena-demos/bin \
&& find /usr/local/ -type f -executable -exec ln -s {} /olena-demos/bin/ \;
CMD /bin/bash -c "source /etc/apache2/envvars && /usr/sbin/apache2 -DFOREGROUND"
.PHONY: build push clean
DOCKER_TAG = registry.lrde.epita.fr/olena-demos
build:
docker build -t $(DOCKER_TAG) --pull=true --no-cache --force-rm .
build-with-cache:
docker build -t $(DOCKER_TAG) --pull=true --force-rm .
push:
docker push $(DOCKER_TAG)
clean:
docker rmi $(DOCKER_TAG)
<VirtualHost *:80>
ServerAdmin admin@lrde.epita.fr
DocumentRoot /olena-demos/www
<Directory /olena-demos/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<?php
$modules = array( "milena" => Array("http://olena.lrde.epita.fr", "Milena Library"),
"scribo" => Array("http://olena.lrde.epita.fr/Modules#SCRIBO", "Scribo Module") );
// Default size limit. Can be explicitly overridden by the demos.
$default_limit_size = 20971520; // 20Mo
// Name, script.php, example_dir, module
$demos = Array(
Array("Text detection in natural pictures", "text_detection_in_pics.php", "pic", "scribo"), // demoId = 0
Array("Document Binarization", "sauvola_ms.php", "doc", "scribo"), // demoId = 1
Array("Document Layout Analysis and Reconstruction", "document_segmentation.php", "docsnr", "scribo"), // demoId = 2
Array("Context-Based Energy Estimator", "energy_estimator.php", "objectseg", "milena"), // demoId = 3
Array("Region Adjacency Graph", "region_adjacency_graph.php", "regadjgraph", "milena"), // demoId = 4
Array("Morphological Filtering in Shape Spaces", "shape_morphology.php", "shapemorpho", "milena"), // demoId = 5
Array("Historical Document Layout Analysis", "historical_document_layout_analysis.php", "hdocla", "scribo"), // demoId = 6
Array("Staff Removal in Music Scores", "staff_removal.php", "staffrm", "milena"), // demoId = 7
);
$changelog = Array(
1 => Array("22/06/10", "Initial release."),
2 => Array("08/10/10", "the computation time does not include I/O anymore."),
3 => Array("05/01/11", "New demo available: document segmentation and reconstruction"),
4 => Array("15/09/11", "Improve document segmentation and reconstruction demo."),
5 => Array("30/11/11", "Improve execution time for document segmentation and reconstruction demo."),
6 => Array("16/05/12", "New demo available: Context-Based Energy Estimator, Application To Object Segmentation On The Tree Of Shapes"),
7 => Array("22/05/12", "New demo available: Region Adjacency Graph"),
8 => Array("04/09/12", "Add parameter tuning for document binarization demo."),
9 => Array("07/09/12", "Slight cleanup in OCR output in document reconstruction demo."),
10 => Array("24/09/12", "New demo available: Morphological Filtering in Shape Spaces, Applications using Tree-Based Image Representations"),
11 => Array("27/11/12", "Add more outputs to document segmentation and reconstruction demo."),
12 => Array("28/03/13", "New demo available: Historical Document Layout Analysis demo."),
"last" => Array("03/04/13", "New demo available: Staff Removal in Music Scores.")
);
// Base directory of demos
$demos_basedir = "/olena-demos/www/olena/demos";
// Base directory of demos
$demos_bindir = "/olena-demos/bin";
$share_olena_templatepath = "/usr/local/share/olena";
// Online base URL
$base_url = "http://localhost:8765/olena/demos";
// $base_url = "http://mexico.lrde.epita.fr/olena/demos";
// LD_LIBRARY_PATH while running demos.
$ld_library_path = "";
$trac_browser_url = "https://trac.lrde.epita.fr/olena/browser/";
deb http://ftp2.fr.debian.org/debian jessie main non-free contrib
deb http://ftp2.fr.debian.org/debian jessie-updates main contrib non-free
deb http://ftp2.fr.debian.org/debian jessie-backports main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment