-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pvdaq and fargate examples added--fargate not working yet
- Loading branch information
Showing
12 changed files
with
1,038 additions
and
352 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from dask.distributed import Client | ||
from dask_cloudprovider.aws import FargateCluster | ||
r''' | ||
Optional: | ||
tags: only use this if your organization enforces tag policies | ||
Required: | ||
image: should be a dockerhub public image. Please customize your image if needed | ||
''' | ||
|
||
TAGS = { | ||
"project-pa-number": "21691-H2001", | ||
"project": "pvinsight" | ||
} | ||
|
||
IMAGE = "smiskov/dask-sdt-sm:latest" | ||
def _init_fargate_cluster(tags: dict, image: str, scale_num: int) -> FargateCluster: | ||
cluster = FargateCluster(tags=tags, image=image) | ||
cluster.scale(scale_num) # TODO: this probably should be accessible somewhere else | ||
return cluster | ||
|
||
def _init_dask_client(cluster: FargateCluster) -> Client: | ||
client = Client(cluster) | ||
return client | ||
|
||
def get_fargate_cluster(tags=TAGS, image=IMAGE, scale_num=12) -> Client: | ||
cluster = _init_fargate_cluster(tags, image, scale_num) | ||
return _init_dask_client(cluster) |
Empty file.
Oops, something went wrong.