* address review feedback

* add reference to github and bioconductor packages in worker

* update package management sample

* update package management doc

* remove cluster.json

* remove package installation
This commit is contained in:
zfengms 2018-03-15 12:18:41 -07:00 коммит произвёл GitHub
Родитель d12b5dbaf4
Коммит da656e85e9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -4,11 +4,11 @@ The doAzureParallel package allows you to install packages to your pool in two w
- Installing on pool creation
- Installing per-*foreach* loop
Packages installed at the pool level benefit from only needing to be installed once per node. Each iteration of the foreach can load the library without needing to install them again. Packages installed in the foreach benefit from specifying any specific dependencies required only for that instance of the loop.
Packages installed at the pool level benefit from only needing to be installed once per node. Each iteration of the foreach can load the library without needing to install them again. Packages installed in the foreach benefit from specifying any dependencies required only for that instance of the loop.
## Installing Packages on Pool Creation
Pool level packages support CRAN, GitHub and BioConductor packages. The packages are installed in a shared directory on the node. It is important to note that it is required to explicitly load any packages installed at the cluster level within the foreach loop. For example, if you installed xml2 on the cluster, you must explicitly load it before using it.
Pool level packages support CRAN, GitHub and BioConductor packages. The packages are installed in a shared directory on the node. It is important to note that it is required to add it to .packages parameter (or github or bioconductor for github or bioconductor packages), or explicitly load any packages installed at the pool level within the foreach loop. For example, if you installed xml2 on the cluster, you must explicitly load it or add it to .packages before using it.
```R
foreach (i = 1:4) %dopar% {
@ -17,6 +17,13 @@ foreach (i = 1:4) %dopar% {
xml2::as_list(...)
}
```
or
```R
foreach (i = 1:4, .packages=c('xml2')) %dopar% {
xml2::as_list(...)
}
```
You can install packages by specifying the package(s) in your JSON pool configuration file. This will then install the specified packages at the time of pool creation.
```R

Просмотреть файл

@ -1,9 +1,5 @@
#Please see documentation at docs/20-package-management.md for more details on packagement management.
# install packages
library(devtools)
install_github("azure/doazureparallel")
# import the doAzureParallel library and its dependencies
library(doAzureParallel)