Skip to content

Commit

Permalink
Scripts: only make coiled env in one region (#72)
Browse files Browse the repository at this point in the history
This was a workaround for a Coiled bug that's since been fixed.
  • Loading branch information
gjoseph92 authored Aug 30, 2021
1 parent 98809b4 commit 3f448e7
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions scripts/coiled-envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def create_software_environment_quiet(

async def make_coiled_stuff(
deps: List[str],
regions: List[str],
region: str,
name: str,
) -> None:
examples = Path(__file__).parent.parent / "examples"
Expand All @@ -54,18 +54,18 @@ async def make_coiled_stuff(
name=name_software,
container="coiled/notebook:latest",
pip=deps,
backend_options={"region": region},
)
)

for region in regions:
tg.create_task(
create_software_environment_quiet(
cloud,
name=name,
pip=deps,
backend_options={"region": region},
)
tg.create_task(
create_software_environment_quiet(
cloud,
name=name,
pip=deps,
backend_options={"region": region},
)
)

# Create job configuration for notebook
await cloud.create_job_configuration(
Expand Down Expand Up @@ -111,6 +111,4 @@ def run(cmd: str, **kwargs) -> str:
stackstac_dep = f"stackstac[binder,viz]=={version}"
deps += [stackstac_dep]

asyncio.run(
make_coiled_stuff(deps, regions=["us-west-2", "eu-central-1"], name=name)
)
asyncio.run(make_coiled_stuff(deps, region="us-west-2", name=name))

0 comments on commit 3f448e7

Please sign in to comment.