Skip to content

Commit

Permalink
containerization: removed unnecessary dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Sep 13, 2022
1 parent 9176e13 commit f7d44e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN mkdir -p /usr/src/ticcltools /data
COPY . /usr/src/ticcltools
COPY entrypoint.sh /usr/bin/entrypoint.sh

RUN PACKAGES="libtar libbz2 icu-libs libxml2 libxslt libexttextcat libgomp libstdc++" &&\
BUILD_PACKAGES="build-base autoconf-archive autoconf automake libtool libtar-dev bzip2-dev icu-dev libxml2-dev libxslt-dev libexttextcat-dev git" &&\
RUN PACKAGES="icu-libs libxml2 libstdc++ libbz2 libtar" &&\
BUILD_PACKAGES="build-base autoconf-archive autoconf automake libtool icu-dev bzip2-dev libtar-dev libxml2-dev git" &&\
apk add $PACKAGES $BUILD_PACKAGES &&\
cd /usr/src/ && ./ticcltools/build-deps.sh &&\
cd ticcltools && sh ./bootstrap.sh && ./configure && make && make install &&\
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ The actual TICCL post-correction programs in this collection are:
(https://github.com/LanguageMachines/foliautils) collection for the tool:
FoLiA-correct.

## Container

## Container Usage

A pre-made container image can be obtained from Docker Hub as follows:
Expand Down
24 changes: 12 additions & 12 deletions build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ fi
PWD="$(pwd)"
BUILDDIR="$(mktemp -dt "build-deps.XXXXXX")"
cd "$BUILDDIR"
BUILD_SOURCES="LanguageMachines/ticcutils LanguageMachines/libfolia LanguageMachines/uctodata LanguageMachines/ucto LanguageMachines/foliautils"
for SUFFIX in $BUILD_SOURCES; do \
NAME="$(basename "$SUFFIX")"
git clone "https://github.com/$SUFFIX"
cd "$NAME"
REF=$(git tag -l | grep -E "^v?[0-9]+(\.[0-9])*" | sort -t. -k 1.2,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1)
if [ "$VERSION" = "stable" ] && [ -n "$REF" ]; then
git -c advice.detachedHead=false checkout "$REF"
fi
sh ./bootstrap.sh && ./configure --prefix "$PREFIX" && make && make install
cd ..
done
SUFFIX="LanguageMachines/ticcutils"
NAME="$(basename "$SUFFIX")"
git clone "https://github.com/$SUFFIX"
cd "$NAME"
REF=$(git tag -l | grep -E "^v?[0-9]+(\.[0-9])*" | sort -t. -k 1.2,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1)
if [ "$VERSION" = "stable" ] && [ -n "$REF" ]; then
git -c advice.detachedHead=false checkout "$REF"
fi
sh ./bootstrap.sh && ./configure --prefix "$PREFIX" && make && make install
R=$?
cd ..
cd "$PWD"
[ -n "$BUILDDIR" ] && rm -Rf "$BUILDDIR"
exit $R

0 comments on commit f7d44e1

Please sign in to comment.