# hash:sha256:d789355919d31740d6e1c6e7467ec1865a8fa8dff33b006eebcc5194232bb681
FROM registry.codeocean.com/codeocean/miniconda3:4.12.0-python3.9-ubuntu20.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys \
        0xAD2323F17326AE31401037733E05EBFF05441C52 \
    && apt-get update \
    && apt-get install -y --no-install-recommends software-properties-common \
    && add-apt-repository -y 'deb http://deb.codeocean.com/rstudio-server-bionic/ ubuntu main' \
    && apt-get purge -y --autoremove software-properties-common \
    && apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential=12.8ubuntu1.1 \
        libgit2-dev=0.28.4+dfsg.1-2 \
        libssl-dev=1.1.1f-1ubuntu2.17 \
        pandoc=2.5-3build2 \
        pkg-config=0.29.1-0ubuntu4 \
        r-base=3.6.3-2 \
        rstudio-server=1.2.5033 \
    && rm -rf /var/lib/apt/lists/*

RUN conda install -y \
        jupyter==1.0.0 \
        r-glmnet==4.1_4 \
        r-irkernel==1.3 \
    && conda clean -ya

RUN pip3 install -U --no-cache-dir \
    matplotlib==3.7.0 \
    pandas==1.5.3 \
    seaborn==0.12.2 \
    sentence-transformers==2.2.2

COPY postInstall /
RUN /postInstall
