Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 support for ECS and Fargate #425

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dask_cloudprovider/aws/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ class ECSCluster(SpecCluster, ConfigMixin):
The docker image to use for the scheduler and worker tasks.

Defaults to ``daskdev/dask:latest`` or ``rapidsai/rapidsai:latest`` if ``worker_gpu`` is set.
cpu_architecture: str (optional)
Runtime platform CPU architecture

Defaults to ``X86_64``.
scheduler_cpu: int (optional)
The amount of CPU to request for the scheduler in milli-cpu (1/1024).

Expand Down Expand Up @@ -712,6 +716,7 @@ def __init__(
fargate_workers=None,
fargate_spot=None,
image=None,
cpu_architecture="X86_64",
scheduler_cpu=None,
scheduler_mem=None,
scheduler_port=8786,
Expand Down Expand Up @@ -758,6 +763,7 @@ def __init__(
self._fargate_workers = fargate_workers
self._fargate_spot = fargate_spot
self.image = image
self._cpu_architecture = cpu_architecture.upper()
self._scheduler_cpu = scheduler_cpu
self._scheduler_mem = scheduler_mem
self._scheduler_port = scheduler_port
Expand Down Expand Up @@ -1223,6 +1229,7 @@ async def _create_scheduler_task_definition_arn(self):
if self._volumes and self._mount_volumes_on_scheduler
else [],
requiresCompatibilities=["FARGATE"] if self._fargate_scheduler else [],
runtimePlatform={"cpuArchitecture": self._cpu_architecture},
cpu=str(self._scheduler_cpu),
memory=str(self._scheduler_mem),
tags=dict_to_aws(self.tags),
Expand Down Expand Up @@ -1297,6 +1304,7 @@ async def _create_worker_task_definition_arn(self):
],
volumes=self._volumes if self._volumes else [],
requiresCompatibilities=["FARGATE"] if self._fargate_workers else [],
runtimePlatform={"cpuArchitecture": self._cpu_architecture},
cpu=str(self._worker_cpu),
memory=str(self._worker_mem),
tags=dict_to_aws(self.tags),
Expand Down
1 change: 1 addition & 0 deletions dask_cloudprovider/cloudprovider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cloudprovider:
scheduler_timeout: "5 minutes" # Length of inactivity to wait before closing the cluster

image: "daskdev/dask:latest" # Docker image to use for non GPU tasks
cpu_architecture: "X86_64" # Runtime platform CPU architecture
gpu_image: "rapidsai/rapidsai:latest" # Docker image to use for GPU tasks
cluster_name_template: "dask-{uuid}" # Template to use when creating a cluster
cluster_arn: "" # ARN of existing ECS cluster to use (if not set one will be created)
Expand Down
Loading