Codebase list apertium-apy / ca2e2410-6221-43b5-8971-1f20e198e325/main Dockerfile
ca2e2410-6221-43b5-8971-1f20e198e325/main

Tree @ca2e2410-6221-43b5-8971-1f20e198e325/main (Download .tar.gz)

Dockerfile @ca2e2410-6221-43b5-8971-1f20e198e325/mainraw · history · blame

FROM apertium/base
LABEL maintainer sushain@skc.name
WORKDIR /root

# Install packaged dependencies

RUN apt-get -qq update && apt-get -qq install \
    apt-utils \
    automake \
    gcc-multilib \
    git \
    python \
    python3-dev \
    python3-pip \
    sqlite3 \
    zlib1g-dev

# Install CLD2

RUN git clone https://github.com/CLD2Owners/cld2
RUN cd /root/cld2/internal && \
    CPPFLAGS='-std=c++98' ./compile_libs.sh && \
    cp *.so /usr/lib/
RUN git clone https://github.com/mikemccand/chromium-compact-language-detector
RUN cd /root/chromium-compact-language-detector && \
    python3 setup.py build && python3 setup_full.py build && \
    python3 setup.py install && python3 setup_full.py install

# Install Apertium-related libraries (and a test pair)

RUN apt-get -qq update && apt-get -qq install giella-core giella-shared hfst-ospell
RUN apt-get -qq update && apt-get -qq install apertium-en-es

# Install APy

COPY requirements.txt apertium-apy/
RUN pip3 install -r apertium-apy/requirements.txt

COPY . apertium-apy
RUN cd apertium-apy && make -j2

# Run APy

EXPOSE 2737
ENTRYPOINT ["python3", "/root/apertium-apy/servlet.py", "--lang-names", "/root/apertium-apy/langNames.db"]
CMD ["/usr/share/apertium/modes", "--port", "2737"]