<commit_before>FROM ubuntu:bionic
EXPOSE 5011

ENV DEBIAN_FRONTEND noninteractive
ENV MODULE /usr/local/src/sepal/modules/app-manager/docker
ENV SHARED /usr/local/src/sepal/lib/js/shared

ADD kernels /etc/sepal/app-manager/kernels-templates

RUN apt update && apt install -y \
    curl \
    git \
    python3 \
    python3-venv \
    sudo

RUN adduser node && adduser node sudo && echo 'node      ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers

USER node
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
RUN bash -c "source /home/node/.nvm/nvm.sh && nvm install node stable"

ADD build/lib/js/shared ${SHARED}
WORKDIR ${SHARED}/js/shared
USER root
RUN chown -R node: ${SHARED}
USER node
RUN bash -c "source /home/node/.nvm/nvm.sh && npm install"

ADD package.json ${MODULE}/
WORKDIR ${MODULE}
USER root<commit_msg>Included additional libraries needed by Python libraries installation.<commit_after>FROM ubuntu:bionic
EXPOSE 5011

ENV DEBIAN_FRONTEND noninteractive
ENV MODULE /usr/local/src/sepal/modules/app-manager/docker
ENV SHARED /usr/local/src/sepal/lib/js/shared

ADD kernels /etc/sepal/app-manager/kernels-templates

RUN apt update && apt install -y \
    curl \
    gcc \
    git \
    libpq-dev \
    python3 \
    python3-dev \
    python3-pip \
    python3-venv \
    python3-wheel \
    software-properties-common \
    sudo

RUN apt-add-repository ppa:ubuntugis/ubuntugis-unstable -y

RUN apt-get update && apt-get install -y \
    libgdal-dev \
    gdal-bin \
    python3-gdal

RUN pip3 install --upgrade pip

RUN adduser node && adduser node sudo && echo 'node      ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers

USER node
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
RUN bash -c "source /home/node/.nvm/nvm.sh && nvm install node stable"

ADD build/lib/js/shared ${SHARED}
WORKDIR ${SHARED}/js/shared
USER root
RUN chown -R node: ${SHARED}
USER node
RUN bash -c "source /home/node/.nvm/nvm.sh && npm install"

ADD package.json ${MODULE}/
WORKDIR ${MODULE}
USER root
{'fraction_non_alphanumeric': 0.12242899118511263, 'fraction_numerical': 0.012242899118511263, 'mean_word_length': 3.152439024390244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '6422917', 'n_tokens_mistral': 776, 'n_tokens_neox': 736, 'n_words': 194}