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

geoHeil

04/27/2022, 9:04 AM
How can I specify different volume mappings for the dagster docker executor (per volume) i.e for image A map volume a_foo but for image B map volume b_baz? The current configuration in dagster.yaml looks rather like a (single) global configuration.
d

daniel

04/27/2022, 3:00 PM
As luck would have it we just added the ability to do this very recently. The syntax is a bit involved, but you can set an env var on your gRPC server that tells it to apply certain config only to runs that are launched from code in that gRPC server. For example you could add this to your docker-compose file for that specific gRPC container:
Copy code
environment:
  DAGSTER_CLI_API_GRPC_CONTAINER_CONTEXT: '{"docker": {"container_kwargs": {"volumes": ["/abs/repo.py:/opt/dagster/app/"] } } }'
and then that will ensure that any runs launched from that code will mount those volumes. (there's also a --container-context argument to the
dagster api grpc
command - the env var is just a way of programatically setting that argument)
🎉 1
4 Views