Skip to content

Add shm-size and ipc-mode options to docker run script generation - #256

Open
bomquangia wants to merge 1 commit into
developfrom
shm-size-ipc-mode-docker-flags
Open

Add shm-size and ipc-mode options to docker run script generation#256
bomquangia wants to merge 1 commit into
developfrom
shm-size-ipc-mode-docker-flags

Conversation

@bomquangia

Copy link
Copy Markdown

Summary

  • Adds two optional parameters to TaskCommandFileGenerator.writeDockerRunScript and apply: shmSize and ipcMode
  • When set, the generated docker run script includes --shm-size and --ipc flags respectively
  • Both default to None; existing behavior is entirely unchanged when neither is provided
  • Flags are emitted as quoted direct argv tokens in the docker run line, not via shell variable expansion

Changes

  • src/main/resources/templates/exec/dockerRunScript.ssp — conditional --shm-size / --ipc tokens in the docker run block
  • src/main/scala/wdlTools/exec/TaskExecutor.scala — optional params on writeDockerRunScript and apply
  • src/test/scala/wdlTools/exec/TaskCommandFileGeneratorTest.scala — new test class with cases for all flag combinations
  • RELEASE_NOTES.md — changelog entry

Test plan

  • CI passes
  • All four flag combinations covered by unit tests: neither set, shm only, ipc only, both set

Extends TaskCommandFileGenerator and the dockerRunScript SSP template
with two new optional parameters: shmSize and ipcMode. When set, the
generated docker run command includes --shm-size and --ipc flags
respectively. Both default to None, leaving existing behavior unchanged.

Flags are emitted as quoted direct argv tokens in the docker run
invocation rather than through shell variable expansion, preventing
shell-meta injection even if upstream validation were bypassed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant