Files
OBIJupyterHub/Dockerfile

48 lines
1.3 KiB
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 \
2025-10-15 07:15:05 +02:00
git \
build-essential \
curl \
2025-10-14 17:40:41 +02:00
&& 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
2025-10-15 07:15:05 +02:00
RUN R -e "install.packages(c('tidyverse', 'vegan', 'ade4'), 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:15:05 +02:00
# Install obitools4 (written in Go)
RUN curl -L https://raw.githubusercontent.com/metabarcoding/obitools4/master/install_obitools.sh | bash
# Install csvkit
RUN pip install csvkit
# Install csvlens
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y \
&& . $HOME/.cargo/env \
&& cargo install csvlens \
&& mv $HOME/.cargo/bin/csvlens /usr/local/bin/ \
&& rm -rf $HOME/.cargo $HOME/.rustup
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}
2025-10-15 07:15:05 +02:00
WORKDIR /home/${NB_USER}