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

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_PRIORITY critical
ENV DEBCONF_NOWARNINGS yes

ENV UCENGINE_USER ucengine
ENV UCENGINE_ROOT /code
ENV UCENGINE_REL_PATH ${UCENGINE_ROOT}/rel/ucengine
ENV UCENGINE_PKGS openssl erlang erlang-yaws
ENV UCENGINE_BUILD_PKGS make git

ENV ERL_LIBS /usr/lib/yaws/

RUN groupadd -r ${UCENGINE_USER} \
    && useradd -r -m \
    --home-dir ${UCENGINE_ROOT} \
    -s /usr/sbin/nologin \
    -g ${UCENGINE_USER} ${UCENGINE_USER}

RUN apt-get update \
    && apt-get -y upgrade \
    && apt-get install -y ${UCENGINE_PKGS} ${UCENGINE_BUILD_PKGS} --no-install-recommends \
    && apt-get purge --auto-remove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR ${UCENGINE_ROOT}
COPY . ${UCENGINE_ROOT}
RUN chown -R ${UCENGINE_USER}:${UCENGINE_USER} ${UCENGINE_ROOT}

# Install as user
USER ${UCENGINE_USER}

RUN make rel

USER root

WORKDIR ${UCENGINE_REL_PATH}

VOLUME ["${UCENGINE_REL_PATH}/etc"]

EXPOSE 5280

USER ${UCENGINE_USER}

CMD ["./bin/ucengine", "run"]<commit_msg>Remove unecessary USER switch.<commit_after>FROM debian:stable
MAINTAINER <NAME> <<EMAIL>>

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_PRIORITY critical
ENV DEBCONF_NOWARNINGS yes

ENV UCENGINE_USER ucengine
ENV UCENGINE_ROOT /code
ENV UCENGINE_REL_PATH ${UCENGINE_ROOT}/rel/ucengine
ENV UCENGINE_PKGS openssl erlang erlang-yaws
ENV UCENGINE_BUILD_PKGS make git

ENV ERL_LIBS /usr/lib/yaws/

RUN groupadd -r ${UCENGINE_USER} \
    && useradd -r -m \
    --home-dir ${UCENGINE_ROOT} \
    -s /usr/sbin/nologin \
    -g ${UCENGINE_USER} ${UCENGINE_USER}

RUN apt-get update \
    && apt-get -y upgrade \
    && apt-get install -y ${UCENGINE_PKGS} ${UCENGINE_BUILD_PKGS} --no-install-recommends \
    && apt-get purge --auto-remove -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR ${UCENGINE_ROOT}
COPY . ${UCENGINE_ROOT}
RUN chown -R ${UCENGINE_USER}:${UCENGINE_USER} ${UCENGINE_ROOT}

# Install as user
USER ${UCENGINE_USER}

RUN make rel

WORKDIR ${UCENGINE_REL_PATH}

VOLUME ["${UCENGINE_REL_PATH}/etc"]

EXPOSE 5280

CMD ["./bin/ucengine", "run"]
{'fraction_non_alphanumeric': 0.13175829168559747, 'fraction_numerical': 0.003634711494775102, 'mean_word_length': 3.8395604395604397, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, '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': '1134632', 'n_tokens_mistral': 944, 'n_tokens_neox': 878, 'n_words': 202}