Skip to content

Commit

Permalink
Add support for container options to Azure Batch
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Apr 26, 2022
1 parent bccafae commit 3f4f00f
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -349,10 +349,14 @@ class AzBatchService implements Closeable {
config.storage().getFileShares().each {
volumes += " -v ${mountPath}/${it.key}:${it.value.mountPath}:rw"
}
// container settings
def opts = "-v /etc/ssl/certs:/etc/ssl/certs:ro -v /etc/pki:/etc/pki:ro ${volumes} "
if( task.config.getContainerOptions() )
opts += "${task.config.getContainerOptions()} "
final containerOpts = new TaskContainerSettings()
.withImageName(container)
// mount host certificates otherwise `azcopy` fails
.withContainerRunOptions("-v /etc/ssl/certs:/etc/ssl/certs:ro -v /etc/pki:/etc/pki:ro ${volumes} ")
.withContainerRunOptions(opts)

final slots = computeSlots(task, pool)
log.trace "[AZURE BATCH] Submitting task: $taskId, cpus=${task.config.getCpus()}, mem=${task.config.getMemory()?:'-'}, slots: $slots"
Expand Down

0 comments on commit 3f4f00f

Please sign in to comment.