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

Scripts: only make coiled env in one region #72

Merged
merged 1 commit into from
Aug 30, 2021
Merged
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
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))