Skip to contents

Extends ProcessRequirements. CPURequirement and MemRequirement to setup CPU and Memory requiremnts.

requirements and hints

Usage

docker(
  pull = NULL,
  imageId = NULL,
  load = NULL,
  file = NULL,
  output = NULL,
  dockerPull = pull,
  dockerImageId = imageId,
  dockerLoad = load,
  dockerFile = file,
  dockerOutputDirectory = output,
  ...
)

requirements(...)

fileDef(name = NULL, content = NULL)

Arguments

pull

[short form argument] Docker Repository[:Tag] like rocker/r-base

imageId

[short form argument] The image id that will be used for docker run, imageId Optionally set the id of image you get from SDK.

load

[short form argument] Specify a HTTP URL from which to download a Docker image using docker load.

file

[short form argument] Supply the contents of a Dockerfile which will be built using docker build.

output

[short form argument] Set the designated output directory to a specific location inside the Docker container.

dockerPull

Docker Repository[:Tag] like rocker/r-base

dockerImageId

The image id that will be used for docker run, imageId Optionally set the id of image you get from SDK.

dockerLoad

Specify a HTTP URL from which to download a Docker image using docker load.

dockerFile

Supply the contents of a Dockerfile which will be built using docker build.

dockerOutputDirectory

Set the designated output directory to a specific location inside the Docker container.

...

extra aguments passed

name

file name

content

file content, could be script

Value

A Requirement subclass.

Details

It constructs ProesssRequirementList object, or from a returned raw list contains or requirements.

Fields

value

[Integer] for CPU default is 1L, if 0L, use all CPU. For mem, default is 1000L. Note: for CPU, 0L means multi-tread, and non-zero value will be converted to 1L, which means single thread.

Examples

cpu(1)
#> class: sbg:CPURequirement
#> value: 1
#> 
CPURequirement(value = 1L)
#> class: sbg:CPURequirement
#> value: 1
#> 
docker("rocker/r-base")
#> class: DockerRequirement
#> dockerPull: rocker/r-base
#> 
requirements(docker("rocker/r-base"), cpu(1), mem(1024))
#> [[1]]
#> class: DockerRequirement
#> dockerPull: rocker/r-base
#> 
#> [[2]]
#> class: sbg:CPURequirement
#> value: 1
#> 
#> [[3]]
#> class: sbg:MemRequirement
#> value: 1024
#> 
mem(2000)
#> class: sbg:MemRequirement
#> value: 2000
#> 
MemRequirement(value = 2000L)
#> class: sbg:MemRequirement
#> value: 2000
#> 
aws("c3.8xlarge")
#> class: sbg:AWSInstanceType
#> value: c3.8xlarge
#> 
anyReq("any")
#> class: ''
#> value: any
#>