зеркало из https://github.com/Azure/aztk.git
Bug: Fixed R Dockerfiles (#357)
* Fixed consistency in format * Give user permissions to reinstall R packages
This commit is contained in:
Родитель
a86dc7ee26
Коммит
5ceec67346
|
@ -96,8 +96,6 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Add a library directory (for user-installed packages)
|
||||
&& mkdir -p /usr/local/lib/R/site-library \
|
||||
&& chown root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod g+wx /usr/local/lib/R/site-library \
|
||||
## Fix library path
|
||||
&& echo "R_LIBS_USER='/usr/local/lib/R/site-library'" >> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron \
|
||||
|
@ -109,6 +107,8 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl'); Sys.setenv(SPARK_HOME ='"$SPARK_HOME"')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Use littler installation scripts
|
||||
&& Rscript -e "install.packages(c('littler', 'docopt', 'tidyverse', 'sparklyr'), repo = '$MRAN')" \
|
||||
&& chown -R root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod -R g+wx /usr/local/lib/R/site-library \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
|
||||
|
|
|
@ -113,8 +113,6 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Add a library directory (for user-installed packages)
|
||||
&& mkdir -p /usr/local/lib/R/site-library \
|
||||
&& chown root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod g+wx /usr/local/lib/R/site-library \
|
||||
## Fix library path
|
||||
&& echo "R_LIBS_USER='/usr/local/lib/R/site-library'" >> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron \
|
||||
|
@ -126,6 +124,8 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl');" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& echo "Sys.setenv(SPARK_HOME ='"$SPARK_HOME"');" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& Rscript -e "install.packages(c('littler', 'docopt', 'tidyverse', 'sparklyr', 'keras', 'tensorflow'), repo = '$MRAN')" \
|
||||
&& chown -R root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod -R g+wx /usr/local/lib/R/site-library \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
|
||||
|
|
|
@ -96,8 +96,6 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Add a library directory (for user-installed packages)
|
||||
&& mkdir -p /usr/local/lib/R/site-library \
|
||||
&& chown root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod g+wx /usr/local/lib/R/site-library \
|
||||
## Fix library path
|
||||
&& echo "R_LIBS_USER='/usr/local/lib/R/site-library'" >> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron \
|
||||
|
@ -109,6 +107,8 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl'); Sys.setenv(SPARK_HOME ='"$SPARK_HOME"')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Use littler installation scripts
|
||||
&& Rscript -e "install.packages(c('littler', 'docopt', 'tidyverse', 'sparklyr'), repo = '$MRAN')" \
|
||||
&& chown -R root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod -R g+wx /usr/local/lib/R/site-library \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
|
||||
|
|
|
@ -110,19 +110,12 @@ RUN apt-get update \
|
|||
&& make \
|
||||
&& make install \
|
||||
## Add a default CRAN mirror
|
||||
&& echo "\n\
|
||||
\noptions(repos = c(CRAN = 'https://cran.rstudio.com/'), \
|
||||
\n download.file.method = 'libcurl') \
|
||||
\n" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## && echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Add a library directory (for user-installed packages)
|
||||
&& mkdir -p /usr/local/lib/R/site-library \
|
||||
&& chown root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod g+wx /usr/local/lib/R/site-library \
|
||||
## Fix library path
|
||||
&& echo "R_LIBS_USER='/usr/local/lib/R/site-library'" >> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}"
|
||||
>> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron \
|
||||
## install packages from date-locked MRAN snapshot of CRAN
|
||||
&& [ -z "$BUILD_DATE" ] && BUILD_DATE=$(TZ="America/Los_Angeles" date -I) || true \
|
||||
&& MRAN=https://mran.microsoft.com/snapshot/${BUILD_DATE} \
|
||||
|
@ -131,6 +124,8 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl');" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& echo "Sys.setenv(SPARK_HOME ='"$SPARK_HOME"');" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& Rscript -e "install.packages(c('littler', 'docopt', 'tidyverse', 'sparklyr', 'keras', 'tensorflow'), repo = '$MRAN')" \
|
||||
&& chown -R root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod -R g+wx /usr/local/lib/R/site-library \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
|
||||
|
|
|
@ -96,8 +96,6 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Add a library directory (for user-installed packages)
|
||||
&& mkdir -p /usr/local/lib/R/site-library \
|
||||
&& chown root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod g+wx /usr/local/lib/R/site-library \
|
||||
## Fix library path
|
||||
&& echo "R_LIBS_USER='/usr/local/lib/R/site-library'" >> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron \
|
||||
|
@ -109,6 +107,8 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl'); Sys.setenv(SPARK_HOME ='"$SPARK_HOME"')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Use littler installation scripts
|
||||
&& Rscript -e "install.packages(c('littler', 'docopt', 'tidyverse', 'sparklyr'), repo = '$MRAN')" \
|
||||
&& chown -R root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod -R g+wx /usr/local/lib/R/site-library \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
|
||||
|
|
|
@ -110,16 +110,12 @@ RUN apt-get update \
|
|||
&& make \
|
||||
&& make install \
|
||||
## Add a default CRAN mirror
|
||||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" \
|
||||
>> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
## Add a library directory (for user-installed packages)
|
||||
&& mkdir -p /usr/local/lib/R/site-library \
|
||||
&& chown root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod g+wx /usr/local/lib/R/site-library \
|
||||
## Fix library path
|
||||
&& echo "R_LIBS_USER='/usr/local/lib/R/site-library'" >> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" \
|
||||
>> /usr/local/lib/R/etc/Renviron \
|
||||
&& echo "R_LIBS=\${R_LIBS-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib/R/library'}" >> /usr/local/lib/R/etc/Renviron \
|
||||
## install packages from date-locked MRAN snapshot of CRAN
|
||||
&& [ -z "$BUILD_DATE" ] && BUILD_DATE=$(TZ="America/Los_Angeles" date -I) || true \
|
||||
&& MRAN=https://mran.microsoft.com/snapshot/${BUILD_DATE} \
|
||||
|
@ -128,6 +124,8 @@ RUN apt-get update \
|
|||
&& echo "options(repos = c(CRAN='$MRAN'), download.file.method = 'libcurl');" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& echo "Sys.setenv(SPARK_HOME ='"$SPARK_HOME"');" >> /usr/local/lib/R/etc/Rprofile.site \
|
||||
&& Rscript -e "install.packages(c('littler', 'docopt', 'tidyverse', 'sparklyr', 'keras', 'tensorflow'), repo = '$MRAN')" \
|
||||
&& chown -R root:staff /usr/local/lib/R/site-library \
|
||||
&& chmod -R g+wx /usr/local/lib/R/site-library \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
||||
&& ln -s /usr/local/lib/R/site-library/littler/bin/r /usr/local/bin/r \
|
||||
|
|
Загрузка…
Ссылка в новой задаче