# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. ARG OWNER=jupyter ARG BASE_CONTAINER=$OWNER/minimal-notebook FROM $BASE_CONTAINER LABEL maintainer="Jupyter Project " # Fix: https://github.com/hadolint/hadolint/wiki/DL4006 # Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 SHELL ["/bin/bash", "-o", "pipefail", "-c"] ARG NB_USER="sagemaker-user" ARG NB_UID="1000" ARG NB_GID="100" ENV NB_USER=$NB_USER \ NB_UID=$NB_UID \ NB_GID=$NB_GID \ HOME=/home/$NB_USER USER root # R pre-requisites RUN apt-get update --yes && \ apt-get install --yes --no-install-recommends \ fonts-dejavu \ unixodbc \ unixodbc-dev \ r-cran-rodbc \ gfortran \ gcc && \ apt-get clean && rm -rf /var/lib/apt/lists/* # R packages including IRKernel which gets installed globally. # r-e1071: dependency of the caret R package RUN mamba install --quiet --yes \ 'r-base' \ 'r-caret' \ 'r-crayon' \ 'r-devtools' \ 'r-e1071' \ 'r-forecast' \ 'r-hexbin' \ 'r-htmltools' \ 'r-htmlwidgets' \ 'r-irkernel' \ 'r-nycflights13' \ 'r-randomforest' \ 'r-rcurl' \ 'r-reticulate' \ 'r-rmarkdown' \ 'r-rodbc' \ 'r-rsqlite' \ 'r-shiny' \ 'r-tidyverse' \ 'boto3' \ 'sagemaker' \ 'unixodbc' && \ mamba clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" # `r-tidymodels` is not easy to install under arm RUN set -x && \ arch=$(uname -m) && \ if [ "${arch}" == "x86_64" ]; then \ mamba install --quiet --yes \ 'r-tidymodels' && \ mamba clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}"; \ fi; RUN useradd --non-unique --create-home --shell /bin/bash --gid "${NB_GID}" --uid ${NB_UID} "sagemaker-user" WORKDIR $HOME USER ${NB_UID}