forked from qurator-spk/ocrd-galley
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-core
51 lines (37 loc) · 1.14 KB
/
Dockerfile-core
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM ubuntu:18.04
ARG PIP_INSTALL="pip3 install --no-cache-dir --use-feature=2020-resolver"
ARG OCRD_VERSION_MINIMUM="2.18.1"
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
ENV PIP_DEFAULT_TIMEOUT=120
RUN echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries && \
apt-get update && \
apt-get install -y \
curl xz-utils \
build-essential python3-dev \
# For get-pip.py:
python3-distutils \
# For add-apt-repository:
software-properties-common \
# XML utils
libxml2-utils \
xmlstarlet \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set up OCR-D logging
RUN echo "setOverrideLogLevel(os.getenv('LOG_LEVEL', 'INFO'))" >/etc/ocrd_logging.py
# Install pip (and setuptools)
# We use get-pip.py here to avoid
# a. having to upgrade from Ubuntu's pip
# b. the dreaded "old script wrapper" error message
RUN curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3 get-pip.py && \
rm -f get-pip.py
# Install pip installable-stuff
RUN ${PIP_INSTALL} \
"ocrd >= ${OCRD_VERSION_MINIMUM}"
# Check pip dependencies
RUN pip3 check
WORKDIR /data
# Default command
CMD ['ocrd']