Skip to content

Commit ac35f9e

Browse files
Add Google Cloud support with GCPCluster (#131)
* Add VMCluster class and Digital Ocean implementation * Fix worker startup command * spec work on gcp provider * updates * checkpoint * Working state * Refactoring * working setup * Use correct images * Add more config options, docs and a RAPIDS example * Use correct images * Add more config options, docs and a RAPIDS example * clean up * Add Packer support * fix importerror * credential handling * better messaging * Add autoshutdown to EC2Cluster * more updates * add worker args * more updates * Fix init order and test sync cluster * Skip tests with missing deps * Flake8 * Start on docs refactor * More docs refactor * More documentation * Add flake8 to precommit hooks * Fix linting * Black * update yaml spec and add defaults * move default values to config * Change worker command to module, add worker/scheduler options and refactor * Refactor mixins and siplify code * Refactor EC2Cluster * Change black version * Run black 20.8b1 * Print black version * Force black to 20.8b1 * Shuffle AzureML docs from merge to new location * Add GPU docs * swtich to worker_class * Add package import * fix imports and update google dependecy requirements * Migrate to GitHub Actions (#155) * Migrate to GitHub Actions * Fix environment file name * Quiet conda * Success message * Exclude versioneer from flake8 * add pytest-asycnio/timeout to ci env * Skip sync test without credentials * Test imports * Skip all auth failures and fix linting * Slight refactors, start docs and add non RAPIDS tests * Black * Fix pytest-asyncio versions * Add custom exception for missing credentials * Add missing skip without credentials call * Add docs and fix tests * Remove fixture * Fix get cloud init test Co-authored-by: Jacob Tomlinson <[email protected]> Co-authored-by: Jacob Tomlinson <[email protected]>
1 parent 9f3fc1d commit ac35f9e

File tree

14 files changed

+791
-26
lines changed

14 files changed

+791
-26
lines changed

ci/environment-3.7.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ dependencies:
2727
- tblib
2828
- tornado >=5
2929
- zict >=0.1.3
30+
# `event_loop_policy` change See https://github.com/dask/distributed/pull/4212
31+
- pytest-asyncio >=0.14.0
32+
- pytest-timeout
3033
- pip:
3134
- git+https://github.com/dask/dask
3235
- git+https://github.com/dask/distributed

ci/environment-3.8.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ dependencies:
2727
- tblib
2828
- tornado >=5
2929
- zict >=0.1.3
30+
# `event_loop_policy` change See https://github.com/dask/distributed/pull/4212
31+
- pytest-asyncio >=0.14.0
32+
- pytest-timeout
3033
- pip:
3134
- git+https://github.com/dask/dask
3235
- git+https://github.com/dask/distributed

ci/scripts/test_imports.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ test_import () {
1818
test_import "aws" "import dask_cloudprovider.aws"
1919
test_import "azure" "import dask_cloudprovider.azure"
2020
test_import "digitalocean" "import dask_cloudprovider.digitalocean"
21+
test_import "gcp" "import dask_cloudprovider.gcp"

dask_cloudprovider/aws/ec2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(
5151
self.region = region
5252
self.bootstrap = bootstrap
5353
self.ami = ami
54-
self.docker_image = docker_image
54+
self.docker_image = docker_image or self.config.get("docker_image")
5555
self.instance_type = instance_type
5656
self.gpu_instance = gpu_instance
5757
self.vpc = vpc
@@ -311,6 +311,7 @@ def __init__(
311311
subnet_id=None,
312312
security_groups=None,
313313
filesystem_size=None,
314+
docker_image=None,
314315
**kwargs,
315316
):
316317
self.boto_session = aiobotocore.get_session()
@@ -354,7 +355,7 @@ def __init__(
354355
"region": self.region,
355356
"bootstrap": self.bootstrap,
356357
"ami": self.ami,
357-
"docker_image": self.docker_image,
358+
"docker_image": docker_image or self.config.get("docker_image"),
358359
"instance_type": self.instance_type,
359360
"gpu_instance": self.gpu_instance,
360361
"vpc": self.vpc,

dask_cloudprovider/cloudprovider.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ cloudprovider:
4141
# worker_command: "dask-worker" # The command for workers to run. If the instance_type is a GPU instance dask-cuda-worker will be used.
4242
# ami: "" # AMI ID to use for all instances. Defaults to latest Ubuntu 20.04 image.
4343
instance_type: "t2.micro" # Instance type for all workers
44+
docker_image: "daskdev/dask:latest" # docker image to use
4445
# vpc: "" # VPC id for instances to join. Defaults to default VPC.
4546
# subnet_id: "" # Subnet ID for instances to. Defaults to all subnets in default VPC.
4647
# security_groups: [] # Security groups for instances. Will create a minimal Dask security group by default.
@@ -66,3 +67,14 @@ cloudprovider:
6667
region: "nyc3" # Region to launch Droplets in
6768
size: "s-1vcpu-1gb" # Droplet size to launch, default is 1GB RAM, 1 vCPU
6869
image: "ubuntu-20-04-x64" # Operating System image to use
70+
71+
gcp:
72+
source_image: "projects/ubuntu-os-cloud/global/images/ubuntu-minimal-1804-bionic-v20201014" # the gcp image to use for all instances
73+
zone: "us-east1-c" # the zone of of where to launch the instances
74+
projectid: "" # name of the google cloud project
75+
machine_type: "n1-standard-1" # size of the machine type to use
76+
filesystem_size: 50 # amount in GBs of hard drive space to allocate
77+
ngpus: "" # number of GPUs to use
78+
gpu_type: "" # type of gpus to use: nvidia-tesla-k80, nvidia-tesla-p100, nvidia-tesla-t4
79+
docker_image: "daskdev/dask:latest" # docker image to use
80+
auto_shutdown: true # Shutdown instances automatically if the scheduler or worker services time out.

dask_cloudprovider/gcp/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .instances import GCPCluster

0 commit comments

Comments
 (0)