From 49e46a27e5e3d46d50045f4dfefefb9c3808f869 Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Mon, 9 Dec 2024 10:13:25 +0100 Subject: [PATCH 1/6] Don't chown to root:staff --- ir/ir-base/install_R_source.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir/ir-base/install_R_source.sh b/ir/ir-base/install_R_source.sh index 0efb7a3..e48c148 100755 --- a/ir/ir-base/install_R_source.sh +++ b/ir/ir-base/install_R_source.sh @@ -143,7 +143,7 @@ make clean ## Add a library directory (for user-installed packages) mkdir -p "${R_HOME}/site-library" -chown root:staff "${R_HOME}/site-library" +#chown root:staff "${R_HOME}/site-library" chmod g+ws "${R_HOME}/site-library" ## Fix library path From 8a06e624f513affe9f32ccf3c4a33cbacbc4755f Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Mon, 9 Dec 2024 12:01:56 +0100 Subject: [PATCH 2/6] Ensure build deps are available for libs --- ir/ir-with-libs/Dockerfile.ir | 61 +++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/ir/ir-with-libs/Dockerfile.ir b/ir/ir-with-libs/Dockerfile.ir index 9e991bc..7a74bd6 100644 --- a/ir/ir-with-libs/Dockerfile.ir +++ b/ir/ir-with-libs/Dockerfile.ir @@ -3,19 +3,54 @@ ARG CIRCLE_PULL_REQUEST FROM deepnote/ir:${R_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}} -# Install the R libraries -RUN R -e "install.packages('tidyverse', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('data.table', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('RSQLite', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('remotes', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('reticulate', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('igraph', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('plotly', repos='https://cloud.r-project.org', dependencies=TRUE)" - - # Workaround for Java to install correctly RUN mkdir -p /usr/share/man/man1/ -RUN R -e "install.packages('rgl', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('hdf5r', repos='https://cloud.r-project.org', dependencies=TRUE)" -RUN R -e "install.packages('rJava', repos='https://cloud.r-project.org', dependencies=TRUE)" \ No newline at end of file +# Install R lib dependencies +RUN apt-get update && apt-get install -y curl \ + default-jdk \ + devscripts \ + libbz2-dev \ + libcairo2-dev \ + libcurl4-openssl-dev \ + libpango1.0-dev \ + libjpeg-dev \ + libicu-dev \ + libpcre2-dev \ + libpng-dev \ + libreadline-dev \ + libtiff5-dev \ + liblzma-dev \ + libx11-dev \ + libxt-dev \ + perl \ + rsync \ + subversion \ + tcl-dev \ + tk-dev \ + texinfo \ + texlive-extra-utils \ + texlive-fonts-recommended \ + texlive-fonts-extra \ + texlive-latex-recommended \ + texlive-latex-extra \ + x11proto-core-dev \ + xauth \ + xfonts-base \ + xvfb \ + wget \ + zlib1g-dev \ + && \ + # Install the R libraries + R -e "install.packages('tidyverse', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('data.table', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('RSQLite', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('remotes', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('reticulate', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('igraph', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('plotly', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('rgl', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('hdf5r', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + R -e "install.packages('rJava', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From b1c26d875a3e1dd0cbd31ba23b93fe6af023b113 Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Mon, 9 Dec 2024 12:41:37 +0100 Subject: [PATCH 3/6] Add missing dependencies --- ir/ir-with-libs/Dockerfile.ir | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ir/ir-with-libs/Dockerfile.ir b/ir/ir-with-libs/Dockerfile.ir index 7a74bd6..dc68c34 100644 --- a/ir/ir-with-libs/Dockerfile.ir +++ b/ir/ir-with-libs/Dockerfile.ir @@ -21,6 +21,12 @@ RUN apt-get update && apt-get install -y curl \ libreadline-dev \ libtiff5-dev \ liblzma-dev \ + libgit2-dev \ + libmagick++-dev \ + libudunits2-dev \ + libv8-dev \ + librsvg2-dev \ + libxml2-dev \ libx11-dev \ libxt-dev \ perl \ From d40ed608aa131d869a8bfb72ebb315316937c3dc Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Mon, 9 Dec 2024 12:41:52 +0100 Subject: [PATCH 4/6] Sort dependencies ascending --- ir/ir-with-libs/Dockerfile.ir | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ir/ir-with-libs/Dockerfile.ir b/ir/ir-with-libs/Dockerfile.ir index dc68c34..bbbba5f 100644 --- a/ir/ir-with-libs/Dockerfile.ir +++ b/ir/ir-with-libs/Dockerfile.ir @@ -13,38 +13,38 @@ RUN apt-get update && apt-get install -y curl \ libbz2-dev \ libcairo2-dev \ libcurl4-openssl-dev \ - libpango1.0-dev \ - libjpeg-dev \ + libgit2-dev \ libicu-dev \ + libjpeg-dev \ + liblzma-dev \ + libmagick++-dev \ + libpango1.0-dev \ libpcre2-dev \ libpng-dev \ libreadline-dev \ + librsvg2-dev \ libtiff5-dev \ - liblzma-dev \ - libgit2-dev \ - libmagick++-dev \ libudunits2-dev \ libv8-dev \ - librsvg2-dev \ - libxml2-dev \ libx11-dev \ + libxml2-dev \ libxt-dev \ perl \ rsync \ subversion \ tcl-dev \ - tk-dev \ texinfo \ texlive-extra-utils \ - texlive-fonts-recommended \ texlive-fonts-extra \ - texlive-latex-recommended \ + texlive-fonts-recommended \ texlive-latex-extra \ + texlive-latex-recommended \ + tk-dev \ + wget \ x11proto-core-dev \ xauth \ xfonts-base \ xvfb \ - wget \ zlib1g-dev \ && \ # Install the R libraries From 5f014539319387622813cf9153fec793140d0125 Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Mon, 9 Dec 2024 13:53:42 +0100 Subject: [PATCH 5/6] Purge build dependencies --- ir/ir-with-libs/Dockerfile.ir | 81 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/ir/ir-with-libs/Dockerfile.ir b/ir/ir-with-libs/Dockerfile.ir index bbbba5f..ad62093 100644 --- a/ir/ir-with-libs/Dockerfile.ir +++ b/ir/ir-with-libs/Dockerfile.ir @@ -7,45 +7,47 @@ FROM deepnote/ir:${R_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##* RUN mkdir -p /usr/share/man/man1/ # Install R lib dependencies -RUN apt-get update && apt-get install -y curl \ - default-jdk \ - devscripts \ - libbz2-dev \ - libcairo2-dev \ - libcurl4-openssl-dev \ - libgit2-dev \ - libicu-dev \ - libjpeg-dev \ - liblzma-dev \ - libmagick++-dev \ - libpango1.0-dev \ - libpcre2-dev \ - libpng-dev \ - libreadline-dev \ - librsvg2-dev \ - libtiff5-dev \ - libudunits2-dev \ - libv8-dev \ - libx11-dev \ - libxml2-dev \ - libxt-dev \ - perl \ - rsync \ - subversion \ - tcl-dev \ - texinfo \ - texlive-extra-utils \ - texlive-fonts-extra \ - texlive-fonts-recommended \ - texlive-latex-extra \ - texlive-latex-recommended \ - tk-dev \ - wget \ - x11proto-core-dev \ - xauth \ - xfonts-base \ - xvfb \ - zlib1g-dev \ +ENV BUILDDEPS="curl \ +default-jdk \ +devscripts \ +libbz2-dev \ +libcairo2-dev \ +libcurl4-openssl-dev \ +libgit2-dev \ +libicu-dev \ +libjpeg-dev \ +liblzma-dev \ +libmagick++-dev \ +libpango1.0-dev \ +libpcre2-dev \ +libpng-dev \ +libreadline-dev \ +librsvg2-dev \ +libtiff5-dev \ +libudunits2-dev \ +libv8-dev \ +libx11-dev \ +libxml2-dev \ +libxt-dev \ +perl \ +rsync \ +subversion \ +tcl-dev \ +texinfo \ +texlive-extra-utils \ +texlive-fonts-extra \ +texlive-fonts-recommended \ +texlive-latex-extra \ +texlive-latex-recommended \ +tk-dev \ +wget \ +x11proto-core-dev \ +xauth \ +xfonts-base \ +xvfb \ +zlib1g-dev" + +RUN apt-get update && apt-get install -y ${BUILDDEPS} \ && \ # Install the R libraries R -e "install.packages('tidyverse', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ @@ -59,4 +61,5 @@ RUN apt-get update && apt-get install -y curl \ R -e "install.packages('hdf5r', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ R -e "install.packages('rJava', repos='https://cloud.r-project.org', dependencies=TRUE)" && \ apt-get clean && \ + apt-get remove --purge -y ${BUILDDEPS} && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* From e311f24aee0c7e334e47c870a721b03567a5ed51 Mon Sep 17 00:00:00 2001 From: Hannes Probst Date: Mon, 9 Dec 2024 20:47:29 +0100 Subject: [PATCH 6/6] Ensure we have curl in IR images for toolkit --- ir/ir-base/install_R_source.sh | 3 ++- ir/ir-with-libs/Dockerfile.ir | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ir/ir-base/install_R_source.sh b/ir/ir-base/install_R_source.sh index e48c148..72c0874 100755 --- a/ir/ir-base/install_R_source.sh +++ b/ir/ir-base/install_R_source.sh @@ -37,6 +37,7 @@ fi apt-get install -y --no-install-recommends \ bash-completion \ ca-certificates \ + curl \ file \ fonts-texgyre \ g++ \ @@ -61,7 +62,7 @@ apt-get install -y --no-install-recommends \ zip \ zlib1g -BUILDDEPS="curl \ +BUILDDEPS="\ default-jdk \ devscripts \ libbz2-dev \ diff --git a/ir/ir-with-libs/Dockerfile.ir b/ir/ir-with-libs/Dockerfile.ir index ad62093..54ff8d4 100644 --- a/ir/ir-with-libs/Dockerfile.ir +++ b/ir/ir-with-libs/Dockerfile.ir @@ -7,7 +7,7 @@ FROM deepnote/ir:${R_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##* RUN mkdir -p /usr/share/man/man1/ # Install R lib dependencies -ENV BUILDDEPS="curl \ +ENV BUILDDEPS="\ default-jdk \ devscripts \ libbz2-dev \