Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CRF++ build for 2024 #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Prerequisites
*.d

# Build directories
/.libs/

# Compiled Object files
*.slo
*.lo
Expand Down Expand Up @@ -30,9 +33,35 @@
*.exe
*.out
*.app
/crf_learn
/crf_test

# Vim
*~
*.swp
*.swo

# Autotools
/Makefile
/Makefile.in
/Makefile.msvc
/aclocal.m4
/autom4te.cache/
/compile
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/install-sh
/libtool
/ltmain.sh
/m4/
/missing
/swig/version.h

# Distribution packages
*.tar.gz
*.zip
30 changes: 23 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
FROM ubuntu:20.04

###############################################
# Build stage
###############################################
FROM ubuntu:24.04 as build

RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt-get install --yes \
build-essential && \
apt-get install --no-install-recommends --yes \
automake \
build-essential \
libtool && \
rm -rf /var/lib/apt/lists/* && \
rm -Rf /usr/share/doc && \
rm -Rf /usr/share/man && \
apt-get autoremove -y


ADD . /crfpp
WORKDIR /crfpp

RUN autoreconf --force --install && \
./configure && \
make clean && \
make && \
make install

###############################################
# Production stage
###############################################
FROM ubuntu:24.04 as production

COPY --from=build /usr/local /usr/local

ENV DISTRIB_ID=Ubuntu
ENV DISTRIB_RELEASE=20.04
ENV DISTRIB_RELEASE=24.04

RUN chmod +x ./docker-build.sh && ./docker-build.sh
RUN ldconfig
Loading