@@ -24,14 +24,14 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
24
24
FROM base AS profiler
25
25
RUN apt-get update \
26
26
&& apt-get -y install --no-install-recommends cmake g++ libcppunit-dev libxerces-c-dev \
27
- && git clone ${GITURL}/Profiler --branch devel --single-branch /build \
28
- && cd /build \
27
+ && git clone ${GITURL}/Profiler --branch devel --single-branch /build/Profiler \
28
+ && pushd /build/Profiler \
29
29
&& cmake -DCMAKE_BUILD_TYPE=release . \
30
30
&& make compileFBDic trainFrequencyList runDictSearch profiler \
31
31
&& mkdir /apps \
32
32
&& cp bin/compileFBDic bin/trainFrequencyList bin/profiler bin/runDictSearch /apps/ \
33
- && cd / \
34
- && rm -rf /build
33
+ && popd \
34
+ && rm -rf /build/Profiler
35
35
36
36
FROM profiler AS languagemodel
37
37
# install the profiler's language backend
@@ -40,13 +40,13 @@ COPY --from=profiler /apps/trainFrequencyList /apps/
40
40
COPY --from=profiler /apps/runDictSearch /apps/
41
41
RUN apt-get update \
42
42
&& apt-get -y install --no-install-recommends icu-devtools \
43
- && git clone ${GITURL}/Resources --branch master --single-branch /build \
44
- && cd /build/lexica \
43
+ && git clone ${GITURL}/Resources --branch master --single-branch /build/Resources \
44
+ && pushd /build/Resources /lexica \
45
45
&& PATH=$PATH:/apps make \
46
46
&& PATH=$PATH:/apps make test \
47
47
&& PATH=$PATH:/apps make install \
48
- && cd / \
49
- && rm -rf /build
48
+ && popd \
49
+ && rm -rf /build/Resources
50
50
51
51
FROM base AS postcorrection
52
52
# install ocrd_cis (python)
@@ -56,13 +56,13 @@ COPY --from=profiler /apps/profiler /apps/
56
56
COPY --from=profiler /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib//x86_64-linux-gnu/
57
57
COPY --from=profiler /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib//x86_64-linux-gnu/
58
58
COPY --from=profiler /usr/lib//x86_64-linux-gnu/libxerces-c-3.2.so /usr/lib//x86_64-linux-gnu/
59
- COPY . /build
59
+ COPY . /build/ocrd_cis
60
60
RUN apt-get update \
61
61
&& apt-get -y install --no-install-recommends gcc wget default-jre-headless \
62
- && cd /build \
62
+ && pushd /build/ocrd_cis \
63
63
&& make install \
64
64
# test always fail, resources not available for download. Resources should be made available
65
65
# somewhere else, e.g. github.com/OCR-D/assets
66
66
# && make test \
67
- && cd / \
68
- && rm -rf /build
67
+ && popd \
68
+ && rm -rf /build/ocrd_cis
0 commit comments