From 394e6938c10bee9f601b53ade9bc4f83e79de647 Mon Sep 17 00:00:00 2001 From: krasinski <8573352+krasinski@users.noreply.github.com> Date: Fri, 1 Dec 2023 23:55:02 +0100 Subject: [PATCH] Fix R image build --- kubernetes/build.gradle | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/kubernetes/build.gradle b/kubernetes/build.gradle index ba7f0b54ce..1cc7232eaf 100644 --- a/kubernetes/build.gradle +++ b/kubernetes/build.gradle @@ -32,12 +32,12 @@ task createExternalBackendDockerfile(type: Dockerfile) { } copyFile("sparkling-water-assembly-extensions_${scalaBaseVersion}-${version}-all.jar", "/opt/h2oai/h2o-3/") defaultCommand( - "java", - "-cp", - "/opt/h2oai/h2o-3/sparkling-water-assembly-extensions_${scalaBaseVersion}-${version}-all.jar:/opt/h2oai/h2o-3/h2o.jar", - "-XX:+UseContainerSupport", - "-XX:MaxRAMPercentage=50", - "water.H2OApp") + "java", + "-cp", + "/opt/h2oai/h2o-3/sparkling-water-assembly-extensions_${scalaBaseVersion}-${version}-all.jar:/opt/h2oai/h2o-3/h2o.jar", + "-XX:+UseContainerSupport", + "-XX:MaxRAMPercentage=50", + "water.H2OApp") } task createScalaDockerfile(type: Dockerfile) { @@ -60,17 +60,12 @@ task createRDockerfile(type: Dockerfile) { } else { runCommand "apk add libc-dev linux-headers g++ libxml2-dev" } - runCommand """\\ - R -e 'install.packages("xml2", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("openssl", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("httr", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("bitops", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("RCurl", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("jsonlite", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("testthat", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("dbplyr", repos = "http://cran.us.r-project.org")' && \\ - R -e 'install.packages("sparklyr", repos = "http://cran.us.r-project.org")' - """ + runCommand """ + R -e 'install.packages(c( + "xml2","openssl", "httr", "bitops", "RCurl", "jsonlite", "testthat", + "lifecycle", "pillar", "vctrs", "tidyselect", "tidyr", "tibble", "purrr", "dplyr", "dbplyr", "sparklyr"), + repos = "http://cran.us.r-project.org")' + """.stripIndent().replace("\n", "") copyFile("h2o.tar.gz", "/opt/spark/R/lib/h2o.tar.gz") runCommand "cd /opt/spark/R/lib && R CMD INSTALL h2o.tar.gz" copyFile("rsparkling_${version}.tar.gz", "/opt/spark/R/lib/rsparkling_${version}.tar.gz")