<commit_before># Latex On HTTP Docker container.
FROM debian:stretch
LABEL maintainer="<NAME> <<EMAIL>>"

# Install Texlive: latest release.
COPY ./container/texlive.profile /tmp/
COPY ./container/install_texlive.sh /tmp/
# TODO Make textlive.profile a template, so we can configure the installation path.
RUN /tmp/install_texlive.sh /tmp/texlive.profile
# Add Texlive binaries to path.
ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}"

# Install fonts.
COPY ./container/install_fonts.sh /tmp/
RUN /tmp/install_fonts.sh

# Install Python 3.
COPY ./container/install_python.sh /tmp/
RUN /tmp/install_python.sh

# Clean APT cache.
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Latext packages.
# TODO Make this process dynamic with 
COPY ./container/install_latex_packages.sh /tmp/
RUN /tmp/install_latex_packages.sh

# Create app directory.
RUN mkdir -p /app/latex-on-http
WORKDIR /app/latex-on-http/

# Copy application source code.
# (TODO Or use a mount point? Or use pip install?)
COPY ./Makefile ./requirements.txt /app/latex-on-http/
COPY ./latex-on-http/ /app/latex-on-http/latex-on-http/

RUN make install

EXPOSE 8080
CMD ["make", "start"]
<commit_msg>Fix some path + set locales for Python<commit_after># Latex On HTTP Docker container.
# TODO Build base Texlive package to https://hub.docker.com/,
# so we can speed up installation (just pulling lots of Gb).
FROM debian:stretch
LABEL maintainer="<NAME> <<EMAIL>>"

# Install Texlive: latest release.
COPY ./container/texlive.profile /tmp/
COPY ./container/install_texlive.sh /tmp/
# TODO Make textlive.profile a template, so we can configure the installation path.
RUN /tmp/install_texlive.sh /tmp/texlive.profile
# Add Texlive binaries to path.
ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}"

# Install fonts.
COPY ./container/install_fonts.sh /tmp/
RUN /tmp/install_fonts.sh

# Install Python 3.
COPY ./container/install_python.sh /tmp/
RUN /tmp/install_python.sh

# Clean APT cache.
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Latext packages.
# TODO Make this process dynamic with 
COPY ./container/install_latex_packages.sh /tmp/
RUN /tmp/install_latex_packages.sh

# Set locales.
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

# Create app directory.
RUN mkdir -p /app/latex-on-http
WORKDIR /app/latex-on-http/

# Copy application source code.
# (TODO Or use a mount point? Or use pip install?)
COPY ./Makefile ./Pipfile ./Pipfile.lock /app/latex-on-http/
COPY ./latexonhttp/ /app/latex-on-http/latexonhttp/

RUN make install

EXPOSE 8080
CMD ["make", "start"]

{'fraction_non_alphanumeric': 0.12373145979703357, 'fraction_numerical': 0.0078064012490242, 'mean_word_length': 3.799625468164794, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6901798', 'n_tokens_mistral': 907, 'n_tokens_neox': 864, 'n_words': 271}