Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #17 from Azure/develop
Browse files Browse the repository at this point in the history
Added pool resource files back to makeCluster
  • Loading branch information
brnleehng committed Apr 12, 2017
2 parents e2796e9 + 6f75e4f commit 96ad39a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: doAzureParallel
Type: Package
Title: doAzureParallel
Version: 0.2.1
Version: 0.2.2
Author: Brian Hoang
Maintainer: Who to complain to <yourfault@somewhere.net>
Description: More about what it does (maybe more than one line)
Expand Down
5 changes: 3 additions & 2 deletions R/cluster.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ generateClusterConfig <- function(fileName, ...){
#' @return The request to the Batch service was successful.
#' @examples
#' cluster <- makeCluster("cluster_config.json", fullName = TRUE, wait = TRUE)
makeCluster <- function(fileName = "az_config.json", fullName = FALSE, wait = TRUE){
makeCluster <- function(fileName = "az_config.json", fullName = FALSE, wait = TRUE, resourceFiles = list()){
setPoolOption(fileName, fullName)
config <- getOption("az_config")
pool <- config$batchAccount$pool
Expand All @@ -94,7 +94,8 @@ makeCluster <- function(fileName = "az_config.json", fullName = FALSE, wait = TR

response <- .addPool(
pool = pool,
packages = packages)
packages = packages,
resourceFiles = resourceFiles)

pool <- getPool(pool$name)

Expand Down
6 changes: 5 additions & 1 deletion R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
return(response)
}

.addPool <- function(pool, packages){
.addPool <- function(pool, packages, resourceFiles){
commands <- c("export PATH=/anaconda/envs/py35/bin:$PATH",
"env PATH=$PATH pip install --no-dependencies blobxfer")

Expand All @@ -106,6 +106,10 @@
waitForSuccess = TRUE
)

if(length(resourceFiles) > 0){
startTask$resourceFiles = resourceFiles
}

virtualMachineConfiguration <- list(
imageReference = list(publisher = "microsoft-ads",
offer = "linux-data-science-vm",
Expand Down

0 comments on commit 96ad39a

Please sign in to comment.