Skip to content

Instantly share code, notes, and snippets.

@jtfogarty
Created May 8, 2020 14:55
Show Gist options
  • Save jtfogarty/1538f60628fc11c7ccdd9a6beccbfd53 to your computer and use it in GitHub Desktop.
Save jtfogarty/1538f60628fc11c7ccdd9a6beccbfd53 to your computer and use it in GitHub Desktop.
# Copied from the Jupter Development Team.
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
ARG BASE_CONTAINER=jupyter/minimal-notebook
FROM $BASE_CONTAINER
LABEL maintainer="whosoever will"
USER root
# R pre-requisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
fonts-dejavu \
unixodbc \
unixodbc-dev \
r-cran-rodbc \
gfortran \
gcc && \
rm -rf /var/lib/apt/lists/*
# Fix for devtools https://github.com/conda-forge/r-devtools-feedstock/issues/4
RUN ln -s /bin/tar /bin/gtar
USER $NB_UID
# R packages
RUN conda install --quiet --yes \
'r-base=3.6.2' \
'r-caret=6.0*' \
'r-crayon=1.3*' \
'r-devtools=2.2*' \
'r-forecast=8.11*' \
'r-hexbin=1.28*' \
'r-htmltools=0.4*' \
'r-htmlwidgets=1.5*' \
'r-irkernel=1.1*' \
'r-nycflights13=1.0*' \
'r-plyr=1.8*' \
'r-randomforest=4.6*' \
'r-rcurl=1.98*' \
'r-reshape2=1.4*' \
'r-rmarkdown=2.1*' \
'r-rodbc=1.3*' \
'r-rsqlite=2.1*' \
'r-shiny=1.4*' \
'r-tidyverse=1.3*' \
'unixodbc=2.3.*' \
&& \
conda clean --all -f -y && \
fix-permissions $CONDA_DIR
# Install e1071 R package (dependency of the caret R package)
RUN conda install --quiet --yes r-e1071
ENV NB_PREFIX /
CMD ["sh","-c", "jupyter notebook --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment