Commit db2f1b6b authored by Philippe Grosjean's avatar Philippe Grosjean
Browse files

Update Dockerfile (revert back to last working version)

parent eb4c9be2
Pipeline #245595 failed with stage
in 18 minutes and 47 seconds
......@@ -3,11 +3,11 @@
# For finding rocker images see
# https://github.com/rocker-org/rocker-versioned2
# Define build arguments
# define build arguments
ARG RENKU_BASE=renku/renkulab-py:3.8-0.8.0
ARG BASE_IMAGE=rocker/geospatial:4.0.5
# Define base images
# define base images
FROM $RENKU_BASE as renku_base
FROM $BASE_IMAGE
......@@ -23,19 +23,28 @@ ENV HOME /home/${NB_USER}
ENV SHELL bash
ENV CONDA_PATH /opt/conda
# Prepend conda and local/bin to PATH
# prepend conda and local/bin to PATH
ENV PATH ${HOME}/.local/bin:${CONDA_PATH}/bin:$PATH
# The `rsession` binary that is called by nbrsessionproxy to start R
# doesn't seem to start without this being explicitly set
ENV LD_LIBRARY_PATH /usr/local/lib/R/lib
# pin the version of RStudio
ENV RSTUDIO_VERSION 1.3.959
#ENV RSESSION_PROXY_RSTUDIO_1_4 yes # Required if RStudio version is >= 1.4
# Set PATH for R! It doesn't read from the environment...
# and install pinned RStudio version
RUN echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron && \
echo "PATH=${PATH}" >> /etc/profile.d/set_path.sh && \
/rocker_scripts/install_rstudio.sh
# Add Tini
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini && ln -s /tini /usr/bin/
# Install system dependencies
# install dependencies
RUN apt-get update --fix-missing && \
apt-get install -yq --no-install-recommends \
bzip2 \
......@@ -58,47 +67,26 @@ RUN apt-get update --fix-missing && \
wget \
vim \
# for mongolite
#libssl-dev \
libsasl2-dev \
# for sys
#libapparmor-dev \
# for nloptr
#libnlopt-dev \
#libsasl2-dev \
# for keyring
libsecret-1-dev \
# for sodium
#libsodium-dev \
# for ssh
#libssh-dev \
# suggested by magick and gganimate
#libavfilter-dev \
#libsecret-1-dev \
# added for SciViews Box/BioDataScience
hunspell-en-us \
hunspell-en-gb \
hunspell-fr-classical \
#xclip \
nano && \
apt-get purge && \
apt-get clean && \
apt autoremove --yes && \
rm -rf /var/lib/apt/lists/*
# Inject the renku-jupyter stack
# inject the renku-jupyter stack
COPY --from=renku_base /opt/conda /opt/conda
COPY --from=renku_base --chown=rstudio:rstudio /usr/local/bin/ /usr/local/bin/
COPY --from=renku_base --chown=rstudio:rstudio /home/jovyan/ /home/rstudio/
COPY --from=renku_base /entrypoint.sh /entrypoint.sh
# Pin the version of RStudio
ENV RSTUDIO_VERSION 1.3.959
#ENV RSESSION_PROXY_RSTUDIO_1_4 yes # Required if RStudio version is >= 1.4
# Set PATH for R! It doesn't read from the environment...
# and install pinned RStudio version
RUN echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron && \
echo "PATH=${PATH}" >> /etc/profile.d/set_path.sh && \
/rocker_scripts/install_rstudio.sh
# Set permissions of the R library directory to be editable by NB_USER
# set permissions of the R library directory to be editable by NB_USER
# This is done in the original image, but we don't want this: we want users to
# install packages in the ~/R folder instead
#ADD fix-permissions.sh /usr/local/bin
......@@ -108,7 +96,7 @@ RUN chown 1000:1000 /opt/conda && \
# this hack lets some of the setup from the base renku image work here
ln -s /home/${NB_USER} /home/jovyan
# Customize RStudio
# customize RStudio
COPY config/dictionaries/* /usr/share/hunspell/
RUN mkdir -p /home/rstudio/.config/rstudio/dictionaries && \
chown 1000:1000 /home/rstudio/.config/rstudio/dictionaries && \
......@@ -134,7 +122,7 @@ COPY config/rstudio-prefs.json /etc/rstudio
USER ${NB_USER}
# Set up conda in the NB_USER environment
# set up conda in the NB_USER environment
RUN echo ". ${CONDA_PATH}/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
pip install "jupyter-rsession-proxy==1.1" && \
......@@ -143,11 +131,11 @@ RUN echo ". ${CONDA_PATH}/etc/profile.d/conda.sh" >> ~/.bashrc && \
R --quiet -e "IRkernel::installspec(prefix='${CONDA_PATH}')" && \
echo "source ~/.bashrc" >> ~/.bash_profile
# Install R and python dependencies (plus a JS dependency for webshot)
# install R and python dependencies
COPY install.R /tmp/
COPY requirements.txt /tmp/
RUN R -f /tmp/install.R && \
R --quiet -e "install.packages('webshot'); webshot::install_phantomjs()" && \
#R --quiet -e "install.packages('webshot'); webshot::install_phantomjs()" && \
pip3 install -r /tmp/requirements.txt
COPY post-init.sh /post-init.sh
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment