Hello! We have setup dagster in ECS and we make th...
# deployment-ecs
a
Hello! We have setup dagster in ECS and we make the pipeline code available via a grpc server container, as it is suggested in the docs. We are struggling a bit with how to structure our pipeline code and potential different virtual environments and we wanted to ask you some questions. 1. In dagster.yaml we specify the EcsTaskLauncher and we added the task definition of the grpc server container (because the image contains the pipeline code). It seems that if it inherits the task definition of dagit or dagster-daemon instead it does not have access to the pipeline code via the grpc server, but rather looks for the code in the container local files. Do you know why that is ? 2. How can we use different virtual environments for different pipelines if we are using one grpc server image with the code? We cannot seem to find any way of specifying that from the docs. (can we apply this when using one grpc server as code location?) 3. If we have different images for different pipelines is there any way to pass the image when tasks are launched for different pipelines ? 4. Is the solution to have a different grpc server for each pipeline ? Thanks in advance!
d
Hi Argyro - I'll start with 4 since I think that plays into the others - you don't need a different grpc server for each pipeline, but you do need one for each different virtual environment that you're using. For 2 and 3. You can use a single image that has multiple python environments in it, but you'll need to have a different grpc server running each different python environment in its entrypoint. (There is a "--use-python-environment-entry-point" flag to the "dagster api grpc" command that you should include in your gprc server's entry point if you do this: https://docs.dagster.io/_apidocs/cli#cmdoption-dagster-api-grpc-use-python-environment-entry-point) 1. coming next
I answered how to vary the task definition used for a particular code location here under "In ECS": https://github.com/dagster-io/dagster/discussions/12621
Let me know if that helps!
a
thank you very much for your answers 🙂