Files
OBIJupyterHub/Dockerfile

31 lines
904 B
Docker
Raw Normal View History

2025-10-14 17:40:41 +02:00
FROM jupyter/base-notebook:latest
USER root
2025-10-15 07:10:44 +02:00
# Install R and system dependencies
2025-10-14 17:40:41 +02:00
RUN apt-get update && apt-get install -y \
r-base \
r-base-dev \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2025-10-15 07:10:44 +02:00
# Install R kernel for Jupyter (as root)
2025-10-14 17:40:41 +02:00
RUN R -e "install.packages('IRkernel', repos='http://cran.rstudio.com/')" && \
R -e "IRkernel::installspec(user = FALSE)"
2025-10-15 07:10:44 +02:00
# Install some useful R packages for labs
RUN R -e "install.packages(c('ggplot2', 'dplyr', 'tidyr', 'readr'), repos='http://cran.rstudio.com/')"
2025-10-14 17:40:41 +02:00
2025-10-15 07:10:44 +02:00
# Install bash kernel (as root also)
2025-10-14 17:40:41 +02:00
RUN pip install bash_kernel && \
python -m bash_kernel.install --sys-prefix
2025-10-15 07:10:44 +02:00
# Create necessary directories with proper permissions
2025-10-14 17:40:41 +02:00
RUN mkdir -p /home/${NB_USER}/.local/share/jupyter && \
chown -R ${NB_UID}:${NB_GID} /home/${NB_USER}
USER ${NB_UID}
WORKDIR /home/${NB_USER}