async def test_get_cloud_init(): cloud_init = EC2Cluster.get_cloud_init( env_vars={"EXTRA_PIP_PACKAGES": "s3fs"}, docker_args="--privileged", ) assert "systemctl start docker" in cloud_init assert " -e EXTRA_PIP_PACKAGES=s3fs " in cloud_init assert " --privileged " in cloud_init
async def test_get_cloud_init_rapids(): cloud_init = EC2Cluster.get_cloud_init( # Deep Learning AMI (Ubuntu 18.04) ami="ami-0c7c7d78f752f8f17", # Python version must match local version and CUDA version must match AMI CUDA version docker_image="rapidsai/rapidsai:cuda10.1-runtime-ubuntu18.04-py3.8", instance_type="p3.2xlarge", bootstrap=False, filesystem_size=120, ) assert "rapidsai" in cloud_init
async def cluster_rapids_packer(): await skip_without_credentials() async with EC2Cluster( asynchronous=True, # Packer AMI ami="ami-04e5539cb82859e69", # Python version must match local version and CUDA version must match AMI CUDA version docker_image="rapidsai/rapidsai:cuda10.1-runtime-ubuntu18.04-py3.8", instance_type="p3.2xlarge", bootstrap=False, filesystem_size=120, ) as cluster: yield cluster
async def cluster_rapids(): await skip_without_credentials() async with EC2Cluster( asynchronous=True, # Deep Learning AMI (Ubuntu 18.04) ami="ami-0c7c7d78f752f8f17", # Python version must match local version and CUDA version must match AMI CUDA version docker_image="rapidsai/rapidsai:cuda10.1-runtime-ubuntu18.04-py3.8", instance_type="p3.2xlarge", bootstrap=False, filesystem_size=120, ) as cluster: yield cluster
async def test_init(): cluster = EC2Cluster(asynchronous=True) assert cluster.status == Status.created
async def cluster_packer(): await skip_without_credentials() async with EC2Cluster(asynchronous=True, ami="ami-0e6187593ace05a0c", bootstrap=False) as cluster: yield cluster
async def cluster_sync(): await skip_without_credentials() cluster = EC2Cluster() yield cluster
async def cluster(): await skip_without_credentials() async with EC2Cluster(asynchronous=True) as cluster: yield cluster