<commit_before>FROM debian:jessie
MAINTAINER <NAME> <EMAIL>

# OCAML environment version to install
ENV OCAML_VERSION 4.02.3

# Upgrade distribution
RUN apt-get -q -y update

# Install system-wide dependencies
RUN apt-get -q -y install wget git make autoconf automake supervisor

# Install Liquidsoap dependencies
RUN apt-get -q -y install libpcre3-dev libao-dev libmad0-dev libshout3-dev \
  libvorbis-dev libid3tag0-dev libasound2-dev liblo-dev libfaad-dev \
  libflac-dev ladspa-sdk libsoundtouch-dev libjack-dev libsamplerate0-dev \
  libtag1-dev lame libmp3lame-dev libshine-dev libopus-dev libschroedinger-dev \
  libvo-aacenc-dev libportaudio-ocaml-dev libpulse-ocaml-dev \
  libgstreamer-ocaml-dev libgavl-ocaml-dev libavutil-dev libswscale-dev \
  libfrei0r-ocaml-dev dssi-dev libfaad-dev

# Install OCAML dependencies
RUN apt-get -q -y install opam ocaml-findlib libpcre-ocaml-dev libtool

# Clear APT cache
RUN apt-get clean

# Liquidsoap compilation needs a non-root user
RUN adduser --disabled-password --gecos '' liquidsoap
USER liquidsoap

# Go to Liquidsoap user home directory
WORKDIR /home/liquidsoap

# Clone Liquidsoap repository
RUN git clone --recursive https://github.com/savonet/liquidsoap-full.git

# Initialize OCAML
RUN opam init --comp $OCAML_VERSION

# Set OCAML related environment variables
ENV CAML_LD_LIBRARY_PATH "/home/liquidsoap/.opam/$OCAML_VERSION/lib/stublibs"
ENV MANPATH "/home/liquidsoap/.opam/$OCAML_VERSION/man:$MANPATH"
ENV MAKELEVEL ""
ENV MAKEFLAGS ""
ENV PERL5LIB "/home/liquidsoap/.opam/$OCAML_VERSION/lib/perl5"
ENV OCAML_TOPLEVEL_PATH "/home/liquidsoap/.opam/$OCAML_VERSION/lib/toplevel"
ENV PATH "/home/liquidsoap/.opam/$OCAML_VERSION/bin:$PATH"

# Install Liquidsoap OCAML dependencies
RUN opam install -y ocamlfind dtools duppy mm pcre xmlm camomile

# Go to Liquidsoap repository
WORKDIR liquidsoap-full

# Copy provided package file
COPY ./PACKAGES ./

# Configure Liquidsoap
RUN ./configure

# Compile Liquidsoap
RUN make

# Returns to root user
USER root

# Install Liquidsoap
RUN make install

# Set executable permissions
RUN touch /run.sh && chmod 777 /run.sh

# Copy Supervisor files
COPY ./supervisor.sh /
COPY ./supervisord.conf /etc/

# Run Liquidsoap help command if no arguments are defined
CMD ["liquidsoap", "--help"]

# Define Liquidsoap as entry point
ENTRYPOINT ["liquidsoap"]<commit_msg>Format maintainer line<commit_after>FROM debian:jessie
MAINTAINER <NAME> <<EMAIL>>

# OCAML environment version to install
ENV OCAML_VERSION 4.02.3

# Upgrade distribution
RUN apt-get -q -y update

# Install system-wide dependencies
RUN apt-get -q -y install wget git make autoconf automake supervisor

# Install Liquidsoap dependencies
RUN apt-get -q -y install libpcre3-dev libao-dev libmad0-dev libshout3-dev \
  libvorbis-dev libid3tag0-dev libasound2-dev liblo-dev libfaad-dev \
  libflac-dev ladspa-sdk libsoundtouch-dev libjack-dev libsamplerate0-dev \
  libtag1-dev lame libmp3lame-dev libshine-dev libopus-dev libschroedinger-dev \
  libvo-aacenc-dev libportaudio-ocaml-dev libpulse-ocaml-dev \
  libgstreamer-ocaml-dev libgavl-ocaml-dev libavutil-dev libswscale-dev \
  libfrei0r-ocaml-dev dssi-dev libfaad-dev

# Install OCAML dependencies
RUN apt-get -q -y install opam ocaml-findlib libpcre-ocaml-dev libtool

# Clear APT cache
RUN apt-get clean

# Liquidsoap compilation needs a non-root user
RUN adduser --disabled-password --gecos '' liquidsoap
USER liquidsoap

# Go to Liquidsoap user home directory
WORKDIR /home/liquidsoap

# Clone Liquidsoap repository
RUN git clone --recursive https://github.com/savonet/liquidsoap-full.git

# Initialize OCAML
RUN opam init --comp $OCAML_VERSION

# Set OCAML related environment variables
ENV CAML_LD_LIBRARY_PATH "/home/liquidsoap/.opam/$OCAML_VERSION/lib/stublibs"
ENV MANPATH "/home/liquidsoap/.opam/$OCAML_VERSION/man:$MANPATH"
ENV MAKELEVEL ""
ENV MAKEFLAGS ""
ENV PERL5LIB "/home/liquidsoap/.opam/$OCAML_VERSION/lib/perl5"
ENV OCAML_TOPLEVEL_PATH "/home/liquidsoap/.opam/$OCAML_VERSION/lib/toplevel"
ENV PATH "/home/liquidsoap/.opam/$OCAML_VERSION/bin:$PATH"

# Install Liquidsoap OCAML dependencies
RUN opam install -y ocamlfind dtools duppy mm pcre xmlm camomile

# Go to Liquidsoap repository
WORKDIR liquidsoap-full

# Copy provided package file
COPY ./PACKAGES ./

# Configure Liquidsoap
RUN ./configure

# Compile Liquidsoap
RUN make

# Returns to root user
USER root

# Install Liquidsoap
RUN make install

# Set executable permissions
RUN touch /run.sh && chmod 777 /run.sh

# Copy Supervisor files
COPY ./supervisor.sh /
COPY ./supervisord.conf /etc/

# Run Liquidsoap help command if no arguments are defined
CMD ["--help"]

# Define Liquidsoap as entry point
ENTRYPOINT ["liquidsoap"]
{'fraction_non_alphanumeric': 0.08670765316938732, 'fraction_numerical': 0.008055967776128896, 'mean_word_length': 4.422988505747126, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1810309', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1556, 'n_words': 464}