<commit_before># base information
FROM python:3.9-slim
MAINTAINER <NAME> <<EMAIL>>

# create user
RUN useradd --home-dir /home/spz --create-home --shell /bin/bash --uid 1000 spz

# set workdir
WORKDIR /home/spz/code

# upgrade system and install requirements (normal and build)
RUN apt-get update && \
    mkdir -p /usr/share/man/man1 && \
    mkdir -p /usr/share/man/man7 && \
    apt-get upgrade -y --no-install-recommends && \
    apt-get install -y fonts-dejavu gcc git gpg libmagic1 libpq-dev postgresql-client xz-utils && \
    pip install -U pip setuptools --no-cache-dir && \
    rm -rf /root/.cache /var/cache/*

# install requirements and do cleanup
COPY requirements.txt /home/spz/code/requirements.txt
RUN pip install -U -r requirements.txt --no-cache-dir && \
    rm -rf /root/.cache /var/cache/*

# copy code
COPY ./src/spz /home/spz/code
RUN mkdir /state && \
    chown -R spz:spz /home/spz/code /state

# copy configuration
COPY ./conf/spz/production.cfg /home/spz/code/instance/production.cfg

# security and volumes
VOLUME ["/home/spz/code/spz/static", "/state"]
USER 1000

# set entry point
ENTRYPOINT ["/home/spz/code/util/docker_entrypoint.sh"]

# default to bash
CMD ["bash"]<commit_msg>Expose port on uwsgi container<commit_after># base information
FROM python:3.9-slim
MAINTAINER <NAME> <<EMAIL>>

# create user
RUN useradd --home-dir /home/spz --create-home --shell /bin/bash --uid 1000 spz

# set workdir
WORKDIR /home/spz/code

# upgrade system and install requirements (normal and build)
RUN apt-get update && \
    mkdir -p /usr/share/man/man1 && \
    mkdir -p /usr/share/man/man7 && \
    apt-get upgrade -y --no-install-recommends && \
    apt-get install -y fonts-dejavu gcc git gpg libmagic1 libpq-dev postgresql-client xz-utils && \
    pip install -U pip setuptools --no-cache-dir && \
    rm -rf /root/.cache /var/cache/*

# install requirements and do cleanup
COPY requirements.txt /home/spz/code/requirements.txt
RUN pip install -U -r requirements.txt --no-cache-dir && \
    rm -rf /root/.cache /var/cache/*

# copy code
COPY ./src/spz /home/spz/code
RUN mkdir /state && \
    chown -R spz:spz /home/spz/code /state

# copy configuration
COPY ./conf/spz/production.cfg /home/spz/code/instance/production.cfg

# security and volumes
VOLUME ["/home/spz/code/spz/static", "/state"]
USER 1000

# expose port
EXPOSE 3031

# set entry point
ENTRYPOINT ["/home/spz/code/util/docker_entrypoint.sh"]

# default to bash
CMD ["bash"]
{'fraction_non_alphanumeric': 0.14094232331437856, 'fraction_numerical': 0.012185215272136474, 'mean_word_length': 2.9918962722852513, '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': '1001798', 'n_tokens_mistral': 907, 'n_tokens_neox': 859, 'n_words': 249}