From 35e9832f217e97e10b742f339c58c782289d0c10 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Wed, 1 Nov 2023 13:25:25 -0500 Subject: [PATCH] Use container directly with Coiled --- README.md | 7 ++----- notebooks/odc-stac-s2.ipynb | 4 ++-- scripts/create-software-env.py | 11 ----------- 3 files changed, 4 insertions(+), 18 deletions(-) delete mode 100755 scripts/create-software-env.py diff --git a/README.md b/README.md index b280072..2f93e49 100644 --- a/README.md +++ b/README.md @@ -39,15 +39,12 @@ Coiled allows launching jupyter on an ephemeral cloud machine with a pre-configured software environment. The included Dockerfile defines a geospatial container image and python environment suitable for running the notebooks in the repo; this is published as a public image to AWS ECR with the -image `public.ecr.aws/q2i2x3t4/e84-sandbox/coiled-demo:latest`. We can use this -container image with a coiled software environment (the included script -`./scripts/create-software-env.py`) can be run to setup a software environment -called `cng-workshop` if it does not already exist in your coiled context). +image `public.ecr.aws/q2i2x3t4/e84-sandbox/coiled-demo:latest`. Understanding this, all we need to do to run our jupyter server is the following: ```cmdline -❯ coiled notebook start --software cng-workshop --account element84-demo-workspace +❯ coiled notebook start --container public.ecr.aws/q2i2x3t4/e84-sandbox/coiled-demo:latest --account element84-demo-workspace ``` Running this command will trigger coiled to spin up a new instance to run the diff --git a/notebooks/odc-stac-s2.ipynb b/notebooks/odc-stac-s2.ipynb index ded8d65..0161459 100644 --- a/notebooks/odc-stac-s2.ipynb +++ b/notebooks/odc-stac-s2.ipynb @@ -249,9 +249,9 @@ "# start dask cluster on coiled.io\n", "cluster = coiled.Cluster(\n", " n_workers=10,\n", - " software=\"cng-workshop\",\n", + " container=\"public.ecr.aws/q2i2x3t4/e84-sandbox/coiled-demo:latest\",\n", " account=\"element84-demo-workspace\",\n", - " backend_options={\"region\": \"us-west-2\"}\n", + " region=\"us-west-2\",\n", ")\n", "client = Client(cluster)\n", "\n", diff --git a/scripts/create-software-env.py b/scripts/create-software-env.py deleted file mode 100755 index 08b2bcc..0000000 --- a/scripts/create-software-env.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -import coiled - -ENV_NAME = "cng-workshop" -CONTAINER = "public.ecr.aws/q2i2x3t4/e84-sandbox/coiled-demo" - -coiled.create_software_environment( - name=ENV_NAME, - container=CONTAINER, - force_rebuild=True, -)