From ee49f9dabb416c01c93b7d7d987ba8dfe5ec81dc Mon Sep 17 00:00:00 2001 From: Marco de Abreu Date: Sun, 20 Jan 2019 23:54:01 +0100 Subject: [PATCH] Fix permissions --- ci/docker/install/ubuntu_r.sh | 11 +++++++++++ ci/docker/runtime_functions.sh | 2 ++ 2 files changed, 13 insertions(+) diff --git a/ci/docker/install/ubuntu_r.sh b/ci/docker/install/ubuntu_r.sh index cefc4172f245..4cd0a59195df 100755 --- a/ci/docker/install/ubuntu_r.sh +++ b/ci/docker/install/ubuntu_r.sh @@ -31,6 +31,12 @@ echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources. apt-key add r.gpg +# We have to install some dependencies during runtime - if somebody knows a better solution, +# please don't hesitate to replace this! +# This script is supposed to only be run within Docker, so this should be "safe" to do. +mkdir -p /usr/local/lib/R/site-library +chmod 777 /usr/local/lib/R/site-library + # Installing the latest version (3.3+) that is compatible with MXNet add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/' @@ -42,3 +48,8 @@ apt-get install -y --allow-unauthenticated \ libxt-dev \ r-base \ r-base-dev + +# Pre-install depenendencies +Rscript -e "if(!require(devtools)){install.packages('devtools', repo = 'https://cloud.r-project.org/')}" +Rscript -e "if(!require(devtools)||packageVersion('roxygen2') < '6.1.1'){install.packages('roxygen2', repo = 'https://cloud.r-project.org/')}" +Rscript -e "library(devtools); library(methods); options(repos=c(CRAN='https://cloud.r-project.org/')); install_deps(pkg='R-package', dependencies = TRUE)" \ No newline at end of file diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 3da6c52490e9..76fd2c6a211d 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -883,6 +883,7 @@ unittest_ubuntu_cpu_R() { mkdir -p /tmp/r-site-library # build R packages in parallel mkdir -p ~/.R/ + build_ccache_wrappers echo "MAKEFLAGS = -j"$(nproc) > ~/.R/Makevars # make -j not supported make rpkg \ @@ -898,6 +899,7 @@ unittest_ubuntu_gpu_R() { mkdir -p /tmp/r-site-library # build R packages in parallel mkdir -p ~/.R/ + build_ccache_wrappers echo "MAKEFLAGS = -j"$(nproc) > ~/.R/Makevars # make -j not supported make rpkg \