https://dagster.io/ logo
#ask-community
Title
# ask-community
d

Danny Steffy

06/27/2023, 3:52 PM
is it possible to have the
DockerRunLauncher
container_kwargs
be set at run time based on the code location that the job is running from?
🤖 1
s

sean

06/27/2023, 5:18 PM
Hey Danny, Just want you to know I’ve seen both your above thread and this one and am trying to find someone who can answer them. Not my domain and we have a few experts out-of-office right now
d

Danny Steffy

06/27/2023, 5:41 PM
Thank you for the response, I appreciate it!
I believe we worked around this by having each code location have a different working directory and mounting the working directories for each code location in the DockerRunLauncher config. It feels a bit clunky though
a

alex

06/30/2023, 3:21 PM
you should be able to accomplish this via the
container_context
argument to the code server. Maybe be most easily set via env var
DAGSTER_CONTAINER_CONTEXT
depending on how you are running them
the context of using
container_context
is different in these cloud docs, but that piece of the config makes its way to code server in this way https://docs.dagster.io/dagster-cloud/deployment/agents/docker/configuration-reference
d

Danny Steffy

06/30/2023, 4:16 PM
so I would add the container_context with the
container_kwargs
for the proper mount points?
👍 1
great, thanks so much for your help!
3 Views