-
Notifications
You must be signed in to change notification settings - Fork 591
/
Dockerfile
25 lines (23 loc) · 903 Bytes
/
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
# USAGE
# 1. Build new Docker container:
# > docker build -t ocropy -f Dockerfile .
# 2. Run this Docker container:
# > docker run -it --rm -v ${PWD}:/ocropy ocropy bash
# 3. Run tests:
# ># ./run-test
FROM ubuntu:16.04
MAINTAINER Philipp Zumstein
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONIOENCODING utf8
WORKDIR /ocropy
COPY PACKAGES .
RUN apt-get update && \
apt-get -y install --no-install-recommends git ca-certificates wget unzip && \
apt-get install -y python-pip $(cat PACKAGES) && \
git clone --depth 1 'https://github.com/kba/ocr-models-client' /ocr-models-client && \
/ocr-models-client/ocr-models download -d models 'ocropy/en-default' 'ocropy/fraktur' && \
pip install --upgrade pip coverage && \
apt-get -y remove --purge --auto-remove git wget unzip && \
apt-get clean && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
COPY . .
RUN python setup.py install