:wave: I'm testing out serverless deployments with...
# dagster-plus
h
👋 I'm testing out serverless deployments with a custom docker base image and am running into the below error:
Copy code
{'__typename': 'PythonError', 'message': 'dagster_cloud.workspace.ecs.client.EcsServiceError: ECS service failed because task arn:aws:ecs:us-west-2:657821118200:task/serverless-agent-5cc3cfb8-00af-35b5-b5cc-36acbd602030-Cluster/77123d64bbb542b1afaee60283d9ef5e failed: Essential container in task exited\nTask logs:\nexec /usr/local/bin/dagster: exec format error\n', 'stack': ['  File "/dagster-cloud/dagster_cloud/workspace/user_code_launcher/user_code_launcher.py", line 1203, in _reconcile\n    self._wait_for_new_server_ready(\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/launcher.py", line 357, in _wait_for_new_server_ready\n    task_arn = self.client.wait_for_new_service(\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/client.py", line 405, in wait_for_new_service\n    return self.check_service_has_running_task(\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/client.py", line 517, in check_service_has_running_task\n    self._raise_failed_task(task, container_name, logger)\n', '  File "/dagster-cloud/dagster_cloud/workspace/ecs/client.py", line 442, in _raise_failed_task\n    raise EcsServiceError(task_arn=task_arn, stopped_reason=stopped_reason, logs=logs)\n']}
after waiting for the agent to sync changes to dagster. Has anyone else run into this issue? I can share my dockerfile in the thread here.
Dockerfile:
Copy code
FROM python:3.8-slim

ENV HOME_DIR /opt/dagster/app

RUN mkdir -p /opt/dagster/dagster_home $HOME_DIR
WORKDIR $HOME_DIR

RUN apt-get update && \
    apt-get install -y git make

COPY dagster ./dagster
RUN cd dagster && pip install ".[dev]" dagster-cloud[serverless]

COPY dbt ./dbt
COPY Makefile ./Makefile

RUN cd dbt && \
    dbt deps && \
    dbt ls --profiles-dir $HOME_DIR

CMD ["python"]
The idea is to have the CI build an image that can be used for some validation steps before deployment and reuse that image for the actual deployment
d
Hi Henri - I took a stab at answering this in a discussion here since it comes up a fair amount: https://github.com/dagster-io/dagster/discussions/12966 If it's like the others should be as simple as adding a --platform flag when building the image
h
Ooh perfect! Thanks @daniel I'll give that a try