<commit_before>FROM python:3.9.5-slim-buster as python

# Python build stage ----------------------------------------------------------
FROM python as python-build-stage

ARG BUILD_ENVIRONMENT=production

# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
    # dependencies for building Python packages
    build-essential \
    # psycopg2 dependencies
    libpq-dev

# Requirements are installed here to ensure they will be cached.
COPY ./requirements .

# Create Python Dependency and Sub-Dependency Wheels.
RUN pip wheel --wheel-dir /usr/src/app/wheels -r ${BUILD_ENVIRONMENT}.txt

# Python run stage ------------------------------------------------------------
FROM python as python-run-stage

ARG GIT_SHA
ARG BUILD_ENVIRONMENT=production
ARG APP_HOME=/app

# Set environment variables
ENV LANG C.UTF-8
ENV DEPLOYED=True
ENV DJANGO_SETTINGS_MODULE='config.settings.production'
ENV GIT_SHA ${GIT_SHA}
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV BUILD_ENV ${BUILD_ENVIRONMENT}<commit_msg>Add OCI labels to Docker image<commit_after>FROM python:3.9.5-slim-buster as python

# Python build stage ----------------------------------------------------------
FROM python as python-build-stage

ARG BUILD_ENVIRONMENT=production

# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
    # dependencies for building Python packages
    build-essential \
    # psycopg2 dependencies
    libpq-dev

# Requirements are installed here to ensure they will be cached.
COPY ./requirements .

# Create Python Dependency and Sub-Dependency Wheels.
RUN pip wheel --wheel-dir /usr/src/app/wheels -r ${BUILD_ENVIRONMENT}.txt

# Python run stage ------------------------------------------------------------
FROM python as python-run-stage

ARG GIT_SHA
ARG BUILD_ENVIRONMENT=production
ARG APP_HOME=/app

LABEL org.opencontainers.image.title='CS Unplugged'
LABEL org.opencontainers.image.description='A collection of free teaching material that teaches Computer Science through engaging games and puzzles that use cards, string, crayons and lots of running around.'
LABEL org.opencontainers.image.authors='University of Canterbury Computer Science Education Research Group (UCCSER) https://github.com/uccser'
LABEL org.opencontainers.image.url='https://www.codewof.co.nz/'
LABEL org.opencontainers.image.documentation='https://cs-unplugged.readthedocs.io/'
LABEL org.opencontainers.image.source='https://github.com/uccser/cs-unplugged'
LABEL org.opencontainers.image.vendor='University of Canterbury Computer Science Education Research Group (UCCSER)'
LABEL org.opencontainers.image.licenses='MIT AND CC-BY-SA-4.0'
LABEL org.opencontainers.image.revision=${GIT_SHA}

# Set environment variables
ENV LANG C.UTF-8
ENV DEPLOYED=True
ENV DJANGO_SETTINGS_MODULE='config.settings.production'
ENV GIT_SHA ${GIT_SHA}
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV BUILD_ENV ${BUILD_ENVIRONMENT}
{'fraction_non_alphanumeric': 0.15716694772344014, 'fraction_numerical': 0.005396290050590219, 'mean_word_length': 3.2676258992805756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, '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': '4928696', 'n_tokens_mistral': 878, 'n_tokens_neox': 863, 'n_words': 250}