Replies: 2 comments 4 replies
-
|
How would Conda inter-operate with a docker container in this instance? If there was a Queue Environment using Conda, then a Docker Environment. Would it install to the docker container? (I think not) |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
One more thought on this is what if the user wants more than 1 instance of a container? Given |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
Environment templates can accept parameters for a job, and use them to prepare the environment variables, file system contents, or other aspects of the context in which a job runs. They can be included inside job templates at the job and step level, or can be added externally to a job with the openjd-cli
--environmentoption or scheduler support like with a Deadline Cloud queue environment.Some existing example use cases for context:
To follow the Open Job Description Design Tenets, a solution for containers would interoperate with the example Conda and Rez use cases. Job templates should be portable in a way to run them, unmodified, with either a Conda, Rez, Docker, or Apptainer environment template that provides the software environment to run in.
The RFC Idea
The bash-in-docker example, and the example that runs a background daemon process and then communicating it in each task are not far from starting a docker container in the background and then running each task in that container. The missing ingredient is a way to let the environment template say how to run the task inside of the container without having to modify the job template it's running.
The idea for this RFC is to extend the
<Environment>with a third session action,onWrapTaskRun. The runtime would provide this action with enough context to run the task'sonRunaction itself. That context includes all the properties of the<Action>: Thecommand,args,timeout, andcancelationmethod. Because all the context for running the task lives inside the session working directory, the container commands would need to create a bind mount that maps the path{{Session.WorkingDirectory}}to the identical path within the container.Credit for inspiration of this idea goes to Pydantic's WrapValidator, while implementing OpenJobDescription/openjd-model-for-python#164.
A sketch of how a docker environment template could look with this feature:
Beta Was this translation helpful? Give feedback.
All reactions