Created
January 23, 2024 10:34
-
-
Save krzynio/a47629492b972b96c6b02dc41b694341 to your computer and use it in GitHub Desktop.
Morfeusz on ARM / aarch64 - Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Ubuntu 20.04 as the base image | |
FROM ubuntu:20.04 | |
# Set maintainer label | |
LABEL maintainer="your-email@example.com" | |
# Set environment variables for non-interactive mode | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 | |
# Install necessary packages | |
RUN apt-get update && \ | |
apt-get install -y cmake zip build-essential autotools-dev python3-stdeb wget python3-pip python3-all-dev python3-pyparsing devscripts libcppunit-dev acl default-jdk swig && \ | |
rm -rf /var/lib/apt/lists/* | |
# Link python3 to python | |
RUN ln -s /usr/bin/python3 /usr/bin/python | |
# Prepare Morfeusz build | |
WORKDIR /tmp | |
RUN wget http://download.sgjp.pl/morfeusz/20231126/morfeusz-src-20231126.tar.gz && \ | |
tar zxvf morfeusz-src-20231126.tar.gz && \ | |
rm morfeusz-src-20231126.tar.gz | |
# Build Morfeusz | |
WORKDIR /tmp/Morfeusz | |
RUN wget http://download.sgjp.pl/morfeusz/20231126/sgjp-20231126.tab.gz && \ | |
gunzip sgjp-20231126.tab.gz && \ | |
wget http://download.sgjp.pl/morfeusz/20231126/polimorf-20231126.tab.gz && \ | |
gunzip polimorf-20231126.tab.gz && \ | |
mkdir build && \ | |
cd build && \ | |
cmake -DPY=3.8 -DEMBEDDED_DEFAULT_DICT=1 -DINPUT_DICTIONARIES="/tmp/Morfeusz/input/sgjp-20231126.tab" -DDEFAULT_DICT_NAME=sgjp .. && \ | |
make && \ | |
make install && \ | |
ldconfig && \ | |
python setup.py install | |
# Cleanup Morfeusz build artifacts | |
RUN rm -rf /tmp/Morfeusz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment