Skip to content

Commit 842b4c2

Browse files
author
Robert Sachunsky
committed
docker: adapt to core using /build already
1 parent eb4efe1 commit 842b4c2

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
2424
FROM base AS profiler
2525
RUN apt-get update \
2626
&& 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 \
2929
&& cmake -DCMAKE_BUILD_TYPE=release . \
3030
&& make compileFBDic trainFrequencyList runDictSearch profiler \
3131
&& mkdir /apps \
3232
&& cp bin/compileFBDic bin/trainFrequencyList bin/profiler bin/runDictSearch /apps/ \
33-
&& cd / \
34-
&& rm -rf /build
33+
&& popd \
34+
&& rm -rf /build/Profiler
3535

3636
FROM profiler AS languagemodel
3737
# install the profiler's language backend
@@ -40,13 +40,13 @@ COPY --from=profiler /apps/trainFrequencyList /apps/
4040
COPY --from=profiler /apps/runDictSearch /apps/
4141
RUN apt-get update \
4242
&& 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 \
4545
&& PATH=$PATH:/apps make \
4646
&& PATH=$PATH:/apps make test \
4747
&& PATH=$PATH:/apps make install \
48-
&& cd / \
49-
&& rm -rf /build
48+
&& popd \
49+
&& rm -rf /build/Resources
5050

5151
FROM base AS postcorrection
5252
# install ocrd_cis (python)
@@ -56,13 +56,13 @@ COPY --from=profiler /apps/profiler /apps/
5656
COPY --from=profiler /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib//x86_64-linux-gnu/
5757
COPY --from=profiler /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib//x86_64-linux-gnu/
5858
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
6060
RUN apt-get update \
6161
&& apt-get -y install --no-install-recommends gcc wget default-jre-headless \
62-
&& cd /build \
62+
&& pushd /build/ocrd_cis \
6363
&& make install \
6464
# test always fail, resources not available for download. Resources should be made available
6565
# somewhere else, e.g. github.com/OCR-D/assets
6666
# && make test \
67-
&& cd / \
68-
&& rm -rf /build
67+
&& popd \
68+
&& rm -rf /build/ocrd_cis

0 commit comments

Comments
 (0)