update package management doc (#233)
* 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:
Родитель
d12b5dbaf4
Коммит
da656e85e9
|
@ -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)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче