-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
83 lines (64 loc) · 2.78 KB
/
Containerfile
File metadata and controls
83 lines (64 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM quay.io/jupyter/r-notebook:r-4.5.3
LABEL maintainer="LSIT Systems <lsitops@ucsb.edu>"
USER root
ENV R_STUDIO_VERSION 2026.01.1-403
RUN apt update -qq && \
apt install software-properties-common -y && \
apt update -qq && \
apt upgrade -y && \
apt install -y \
jq \
lsof \
less \
libapparmor1 \
libtiff5-dev \
libfftw3-dev \
libcairo2-dev \
libx11-dev \
x11-utils \
psmisc \
libclang-dev \
gfortran \
libglpk-dev \
libv8-dev \
libssh2-1-dev \
git \
git-lfs \
curl \
libuser \
libuser1-dev \
libpq-dev \
rrdtool \
build-essential \
libxml2-dev \
libcurl4-openssl-dev \
libssl-dev \
build-essential \
cmake \
libnlopt-dev \
libboost-all-dev \
wget \
lmodern && \
apt-get clean
## Install rstudio from source package
RUN wget https://download1.rstudio.org/electron/jammy/amd64/rstudio-${R_STUDIO_VERSION}-amd64.deb && \
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-${R_STUDIO_VERSION}-amd64.deb && \
apt install ./rstudio*.deb -yq && apt-get clean && rm -f ./rstudio*.deb && \
apt-get clean
RUN chmod 777 /var/run/rstudio-server && chmod +t /var/run/rstudio-server
RUN R -e "dotR <- file.path(Sys.getenv('HOME'), '.R'); if(!file.exists(dotR)){ dir.create(dotR) }; Makevars <- file.path(dotR, 'Makevars'); if (!file.exists(Makevars)){ file.create(Makevars) }; cat('\nCXX14FLAGS=-O3 -fPIC -Wno-unused-variable -Wno-unused-function', 'CXX14 = g++ -std=c++1y -fPIC', 'CXX = g++', 'CXX11 = g++', 'CC = gcc','FC = /usr/bin/gfortran', file = Makevars, sep = '\n', append = TRUE)"
RUN pip install nbgitpuller && \
jupyter server extension enable --py nbgitpuller --sys-prefix
RUN conda install -y -c conda-forge libwebp
RUN conda install -y -c conda-forge --freeze-installed jupyter-server-proxy jupyter-rsession-proxy udunits2 imagemagick pandas numpy r-igraph && \
conda clean --all
# Add the conda lib path for RStudio
RUN echo "rsession-ld-library-path=/opt/conda/lib" >> /etc/rstudio/rserver.conf
RUN pip install matplotlib openai "jupyter-ai[all]<3.0.0"
RUN R -e "install.packages(c('usethis','covr','httr','roxygen2','rversions','imager','patchwork','littler', 'docopt','httr','WDI', 'faraway', 'boot', 'car', 'pscl', 'vcd', 'stargazer', 'effsize', 'Rmisc', 'tidyverse', 'brms', 'rstan', 'pak', 'ottr'), repos = 'https://cloud.r-project.org/', Ncpus = parallel::detectCores())"
RUN R -e "pak::pak('bradleyboehmke/harrypotter')"
RUN R -e "pak::pak('gbm-developers/gbm3')"
RUN /usr/local/bin/fix-permissions "${CONDA_DIR}" || true
RUN chown -R jovyan:users /home/jovyan
USER $NB_USER
RUN git lfs install