<commit_before>FROM python:3-onbuild

ONBUILD RUN pip install --no-cache-dir -r docker_requirements.txt

ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE ofm_helper.settings.prod

RUN mkdir -p ~/.ssh
RUN ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
COPY .ssh/* /root/.ssh/

# put current release into version file
RUN git fetch --tags
RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}'
RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}' > version

# migrate database to current structure
RUN mkdir logs

# put static files
RUN python3 manage.py collectstatic --no-input

CMD ["gunicorn", "-c", "gunicorn_conf.py", "ofm_helper.wsgi"]<commit_msg>install docker requirements immediatly, not just in downstream builds<commit_after>FROM python:3-onbuild

RUN pip install --no-cache-dir -r docker_requirements.txt

ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE ofm_helper.settings.prod

RUN mkdir -p ~/.ssh
RUN ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
COPY .ssh/* /root/.ssh/

# put current release into version file
RUN git fetch --tags
RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}'
RUN git describe --tags --always | awk '{split($0,a,"-"); print a[1]}' > version

# migrate database to current structure
RUN mkdir logs

# put static files
RUN python3 manage.py collectstatic --no-input

CMD ["gunicorn", "-c", "gunicorn_conf.py", "ofm_helper.wsgi"]
{'fraction_non_alphanumeric': 0.1389664804469274, 'fraction_numerical': 0.009776536312849162, 'mean_word_length': 4.192028985507246, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5118562', 'n_tokens_mistral': 505, 'n_tokens_neox': 475, 'n_words': 162}