# NOT RUN {
## Load the ECS fargate provider
library(ECSFargateProvider)
provider <- ECSFargateProvider()
## Load the bioconductor foreach redis container
container <- BiocFERWorkerContainer()
## Define a cluster with 2 workers,
## each worker use one fourth CPU core and 512 MB memory
cluster <- makeDockerCluster(cloudProvider = provider,
workerContainer = container,
workerNumber = 2,
workerCpu = 256, workerMemory = 512)
## Start the cluster
cluster$startCluster()
## rescale the worker number
cluster$setWorkerNumber(4)
## Use foreach to do the parallel computing
library(foreach)
getDoParWorkers()
foreach(x= 1:4)%dopar%{
Sys.info()
}
# }
Run the code above in your browser using DataLab