Skip to content

Commit 2339e9d

Browse files
committedOct 18, 2021
Improve dockers build
1 parent 9f52950 commit 2339e9d

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed
 

‎continuous_integration/Dockerfile-hub-ubuntu18.04

+9-4
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ ENV LANGUAGE en_US:en
1111
ENV LC_ALL en_US.UTF-8
1212
RUN locale
1313

14-
ARG SOURCE_BRANCH
1514
ARG GITHUB_TOKEN
16-
ARG JOB_NUMBER
1715
ARG LIMA_DISABLE_FSW_TESTING
1816
ARG LIMA_DISABLE_CPACK_DEBIAN_PACKAGE_SHLIBDEPS
1917
ARG NLTK_PTB_DP_FILE
20-
ARG USE_TENSORFLOW
18+
ARG USE_TENSORFLOW="true"
2119

2220
RUN apt-get install -y software-properties-common; add-apt-repository -y ppa:limapublisher/ppa && apt-get update && apt-get install -y libtensorflow-for-lima-dev
2321

@@ -48,7 +46,7 @@ RUN TEMP_DEB="$(mktemp)" && curl -vLJ -H 'Accept: application/octet-stream' $(c
4846
RUN TEMP_DEB="$(mktemp)" && curl -vLJ -H 'Accept: application/octet-stream' $(curl -s https://api.github.com/repos/aymara/svmtool-cpp/releases/latest?access_token=$GITHUB_TOKEN | grep browser_download_url | grep ubuntu18 | grep '.deb"' | head -n 1 | cut -d '"' -f 4)?access_token=$GITHUB_TOKEN -o "$TEMP_DEB" && dpkg -i "$TEMP_DEB"
4947

5048
RUN mkdir -p /src/
51-
RUN git clone --recurse-submodules https://github.com/aymara/lima /src/lima
49+
RUN git clone --branch=$BRANCH --recurse-submodules https://github.com/aymara/lima /src/lima
5250
WORKDIR /src/lima
5351
ARG CACHEBUST=1
5452
RUN git pull
@@ -85,5 +83,12 @@ RUN /bin/bash -c "set -o pipefail && tva --language=fre test-fre.default.xml tes
8583
WORKDIR /usr/share/apps/lima/tests/xmlreader
8684
RUN /bin/bash -c "set -o pipefail && tvx --language=eng --language=fre test-fre.xmlreader.xml 2>&1 | tee tvx-fre.log"
8785

86+
# install python packages necessary to use the language resources install script
87+
RUN /bin/bash -c "if [ \"$USE_TENSORFLOW\" = true ] ; then pip3 install unix_ar requests tqdm ; fi"
88+
89+
# install English and French UD models
90+
RUN /bin/bash -c "if [ \"$USE_TENSORFLOW\" = true ] ; then lima_models.py -l english ; fi"
91+
RUN /bin/bash -c "if [ \"$USE_TENSORFLOW\" = true ] ; then lima_models.py -l french ; fi"
92+
8893
RUN echo $LIMA_RESOURCES
8994
ENTRYPOINT ["limaserver"]

‎continuous_integration/Dockerfile-travis-ubuntu20.04

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:20.04
33
ENV DEBIAN_FRONTEND=noninteractive
44

55
# Use gcc
6-
#RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update && apt-get install -y locales unzip apt-utils lsb-release git gcc g++ make cmake cmake-data curl python3-nltk gawk wget python3 python3-pip ninja-build qt5-default qtbase5-dev-tools libqt5xmlpatterns5-dev libqt5qml5 qtdeclarative5-dev qml-module-qtquick-extras qml-module-qtquick-controls qml-module-qtquick-layouts qml-module-qtquick2 libenchant-dev libtre-dev libboost-all-dev nodejs npm qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets qml-module-qtquick-scene3d qml-module-qtquick-templates2 qml-module-qtquick-virtualkeyboard qml-module-qtquick-window2 qml-module-qtquick-xmllistmodel libicu-dev libeigen3-dev -qq
6+
#RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update && apt-get install -y locales unzip bash coreutils apt-utils lsb-release git gcc g++ build-essential make cmake cmake-data curl python3-nltk gawk wget python3 python3-pip ninja-build qt5-default qtbase5-dev-tools libqt5xmlpatterns5-dev libqt5qml5 qtdeclarative5-dev qml-module-qtquick-extras qml-module-qtquick-controls qml-module-qtquick-layouts qml-module-qtquick2 libenchant-dev libtre-dev libboost-all-dev nodejs npm qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets qml-module-qtquick-scene3d qml-module-qtquick-templates2 qml-module-qtquick-virtualkeyboard qml-module-qtquick-window2 qml-module-qtquick-xmllistmodel libicu-dev libeigen3-dev -qq
77

88
# Use clang
99
RUN rm -rf /var/lib/apt/lists/* && apt-get clean && apt-get update && apt-get install -y locales unzip bash coreutils apt-utils lsb-release git llvm build-essential clang clang-tidy clang-tools make cmake cmake-data curl python3-nltk gawk wget python3 python3-pip ninja-build qt5-default qtbase5-dev-tools libqt5xmlpatterns5-dev libqt5qml5 qtdeclarative5-dev qml-module-qtquick-extras qml-module-qtquick-controls qml-module-qtquick-layouts qml-module-qtquick2 libenchant-dev libtre-dev libboost-all-dev nodejs npm qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-privatewidgets qml-module-qtquick-scene3d qml-module-qtquick-templates2 qml-module-qtquick-virtualkeyboard qml-module-qtquick-window2 qml-module-qtquick-xmllistmodel libicu-dev libeigen3-dev -qq
@@ -17,13 +17,12 @@ ENV LANGUAGE en_US:en
1717
ENV LC_ALL en_US.UTF-8
1818
RUN locale
1919

20-
ARG BRANCH
20+
ARG BRANCH=master
2121
ARG GITHUB_TOKEN
22-
ARG JOB_NUMBER
2322
ARG LIMA_DISABLE_FSW_TESTING
2423
ARG LIMA_DISABLE_CPACK_DEBIAN_PACKAGE_SHLIBDEPS
2524
ARG NLTK_PTB_DP_FILE
26-
ARG USE_TENSORFLOW
25+
ARG USE_TENSORFLOW="true"
2726

2827
RUN /bin/bash -c "if [ \"$USE_TENSORFLOW\" = true ] ; then apt-get install -y software-properties-common; add-apt-repository -y ppa:limapublisher/ppa; apt-get update; apt-get install -y libtensorflow-for-lima-dev ; fi"
2928

0 commit comments

Comments
 (0)
Please sign in to comment.