From 69875bcaedbc4022831ae9464a6039c8759396c4 Mon Sep 17 00:00:00 2001 From: grallewellyn Date: Mon, 2 Mar 2026 14:50:36 -0800 Subject: [PATCH 1/3] added rustac and upgraded nodejs --- base_images/2i2c/pangeo/environment.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base_images/2i2c/pangeo/environment.yml b/base_images/2i2c/pangeo/environment.yml index 96e6a6a..273fb2f 100644 --- a/base_images/2i2c/pangeo/environment.yml +++ b/base_images/2i2c/pangeo/environment.yml @@ -3,10 +3,10 @@ channels: - conda-forge - nodefaults dependencies: - - duckdb=1.3.2 - - nodejs=24.9.0 - - rustac=0.9.2 - - pip=25.2 + - icu=78.2 + - nodejs=22.22.0 + - rustac=0.9.7 + - pip=26.0 - pip: - rio-tiler==8.0.5 - maap-py==4.2.0 From a75a7b16a743a00b0a0df95a07e14136a9416d2f Mon Sep 17 00:00:00 2001 From: grallewellyn Date: Tue, 3 Mar 2026 09:12:47 -0800 Subject: [PATCH 2/3] fixed problem with VS code in isce3 --- base_images/2i2c/isce3/environment.yml | 4 +- find_isce3_cuda_pytorch.py | 116 +++++++++++++++++++++++++ find_isce3_cuda_tensorflow.py | 114 ++++++++++++++++++++++++ 3 files changed, 232 insertions(+), 2 deletions(-) create mode 100644 find_isce3_cuda_pytorch.py create mode 100644 find_isce3_cuda_tensorflow.py diff --git a/base_images/2i2c/isce3/environment.yml b/base_images/2i2c/isce3/environment.yml index 4f6e67a..c9c9cb3 100644 --- a/base_images/2i2c/isce3/environment.yml +++ b/base_images/2i2c/isce3/environment.yml @@ -7,7 +7,7 @@ dependencies: - awscli=1.44.32 - backoff=2.2.1 - boto3=1.42.42 - - code-server=3.3.1 + - code-server=4.107.0 - cython=3.2.4 - earthaccess=0.16.0 - earthengine-api=1.7.13 @@ -24,7 +24,7 @@ dependencies: - mapclassify=2.10.0 - matplotlib=3.10.8 - mpl-scatter-density=0.8 - - nodejs=25.2.1 + - nodejs=22.22.0 - numba=0.63.1 - numpy=2.3.5 - openssh=10.2p1 diff --git a/find_isce3_cuda_pytorch.py b/find_isce3_cuda_pytorch.py new file mode 100644 index 0000000..ebd6f43 --- /dev/null +++ b/find_isce3_cuda_pytorch.py @@ -0,0 +1,116 @@ +import requests +import subprocess +import re +import os +import sys + +# Constants for the Quay repository +REGISTRY = "quay.io" +REPO = "pangeo/pytorch-notebook" +# Base API URL for tags +BASE_API_URL = f"https://quay.io/api/v1/repository/{REPO}/tag/" + +def get_filtered_quay_tags(): + """Fetches ALL tags using Quay.io pagination and filters them.""" + print(f"๐Ÿ” Fetching ALL tags from {REGISTRY}/{REPO} (this may take a moment)...") + all_tags = [] + page = 1 + has_additional = True + + # Filtering parameters + cutoff_date = "2026.05.02" + date_pattern = re.compile(r'^\d{4}\.\d{2}\.\d{2}$') + + try: + while has_additional: + # Quay API uses a 'page' parameter for pagination + response = requests.get(f"{BASE_API_URL}?page={page}") + if response.status_code != 200: + print(f"โŒ Failed to fetch page {page}: {response.status_code}") + break + + data = response.json() + tags_in_page = data.get('tags', []) + + for tag_obj in tags_in_page: + tag_name = tag_obj.get('name', '') + if date_pattern.match(tag_name): + if tag_name < cutoff_date: + all_tags.append(tag_name) + + # Check if there are more pages to fetch + has_additional = data.get('has_additional', False) + page += 1 + + if page % 5 == 0: + print(f" ...collected {len(all_tags)} date tags so far...") + + except Exception as e: + print(f"โŒ Error during API request: {e}") + + # Sort newest tags first to find the most modern working base image + all_tags.sort(reverse=True) + return all_tags + +def run_isce3_cuda_test(tag): + """Attempts to build a Docker image for amd64 and install isce3-cuda.""" + image_name = f"{REGISTRY}/{REPO}:{tag}" + isce3_version = "0.25.7" + platform = "linux/amd64" + + # Dockerfile logic with the critical CUDA override + dockerfile_content = f""" +FROM --platform={platform} {image_name} +USER root +ENV CONDA_OVERRIDE_CUDA="12.0" +SHELL ["/bin/bash", "-c"] +USER ${{NB_USER}} + +RUN conda update -y -n base conda && \\ + conda install -y -n notebook -c conda-forge isce3-cuda={isce3_version} && \\ + conda run -n notebook python -c "import isce3; print('ISCE3_CUDA_LOADED_SUCCESSFULLY')" +""" + + with open("TempCudaTest.Dockerfile", "w") as f: + f.write(dockerfile_content) + + print(f"\n--- ๐Ÿงช Testing Tag: {tag} (isce3-cuda {isce3_version}) ---") + + try: + # check=False ensures the script doesn't crash on build failure + result = subprocess.run([ + "docker", "build", + "--platform", platform, + "-f", "TempCudaTest.Dockerfile", + "--no-cache", + "-t", "isce3_cuda_probe", + "." + ], capture_output=False) + + return result.returncode == 0 + + finally: + if os.path.exists("TempCudaTest.Dockerfile"): + os.remove("TempCudaTest.Dockerfile") + subprocess.run(["docker", "rmi", "isce3_cuda_probe"], capture_output=True) + # Pulling amd64 images takes a lot of space; cleanup the base image after test + subprocess.run(["docker", "rmi", image_name], capture_output=True) + +if __name__ == "__main__": + tags_to_test = get_filtered_quay_tags() + + if not tags_to_test: + print("โŒ No valid candidate tags found older than cut off date") + else: + print(f"โœ… Found {len(tags_to_test)} candidate images. Starting sequence...") + print("tags to test are ") + print(tags_to_test) + for tag in tags_to_test: + if run_isce3_cuda_test(tag): + print("\n" + "="*60) + print(f"๐Ÿ COMPATIBLE BASE IMAGE FOUND: {tag}") + print(f"Update your Dockerfile to: FROM {REGISTRY}/{REPO}:{tag}") + print("="*60) + sys.exit(0) + else: + print(f"โŒ Tag {tag} failed. Trying next oldest tag...") diff --git a/find_isce3_cuda_tensorflow.py b/find_isce3_cuda_tensorflow.py new file mode 100644 index 0000000..50c9115 --- /dev/null +++ b/find_isce3_cuda_tensorflow.py @@ -0,0 +1,114 @@ +import requests +import subprocess +import re +import os +import sys + +# Constants for the Quay repository +REGISTRY = "quay.io" +REPO = "pangeo/ml-notebook" +# Base API URL for tags +BASE_API_URL = f"https://quay.io/api/v1/repository/{REPO}/tag/" + +def get_filtered_quay_tags(): + """Fetches ALL tags using Quay.io pagination and filters them.""" + print(f"๐Ÿ” Fetching ALL tags from {REGISTRY}/{REPO} (this may take a moment)...") + all_tags = [] + page = 1 + has_additional = True + + # Filtering parameters + cutoff_date = "2026.10.20" + date_pattern = re.compile(r'^\d{4}\.\d{2}\.\d{2}$') + + try: + while has_additional: + # Quay API uses a 'page' parameter for pagination + response = requests.get(f"{BASE_API_URL}?page={page}") + if response.status_code != 200: + print(f"โŒ Failed to fetch page {page}: {response.status_code}") + break + + data = response.json() + tags_in_page = data.get('tags', []) + + for tag_obj in tags_in_page: + tag_name = tag_obj.get('name', '') + if date_pattern.match(tag_name): + if tag_name < cutoff_date: + all_tags.append(tag_name) + + # Check if there are more pages to fetch + has_additional = data.get('has_additional', False) + page += 1 + + if page % 5 == 0: + print(f" ...collected {len(all_tags)} date tags so far...") + + except Exception as e: + print(f"โŒ Error during API request: {e}") + + # Sort newest tags first to find the most modern working base image + all_tags.sort(reverse=True) + return all_tags + +def run_isce3_cuda_test(tag): + """Attempts to build a Docker image for amd64 and install isce3-cuda.""" + image_name = f"{REGISTRY}/{REPO}:{tag}" + isce3_version = "0.25.7" + platform = "linux/amd64" + + # Dockerfile logic with the critical CUDA override + dockerfile_content = f""" +FROM --platform={platform} {image_name} +USER root +ENV CONDA_OVERRIDE_CUDA="12.0" +SHELL ["/bin/bash", "-c"] +USER ${{NB_USER}} + +RUN conda update -y -n base conda && \\ + conda install -y -n notebook -c conda-forge isce3-cuda={isce3_version} && \\ + conda run -n notebook python -c "import isce3; print('ISCE3_CUDA_LOADED_SUCCESSFULLY')" +""" + + with open("TempCudaTestTensorflow.Dockerfile", "w") as f: + f.write(dockerfile_content) + + print(f"\n--- ๐Ÿงช Testing Tag: {tag} (isce3-cuda {isce3_version}) ---") + + try: + # check=False ensures the script doesn't crash on build failure + result = subprocess.run([ + "docker", "build", + "--platform", platform, + "-f", "TempCudaTestTensorflow.Dockerfile", + "--no-cache", + "-t", "isce3_cuda_probe", + "." + ], capture_output=False) + + return result.returncode == 0 + + finally: + if os.path.exists("TempCudaTestTensorflow.Dockerfile"): + os.remove("TempCudaTestTensorflow.Dockerfile") + subprocess.run(["docker", "rmi", "isce3_cuda_probe"], capture_output=True) + # Pulling amd64 images takes a lot of space; cleanup the base image after test + subprocess.run(["docker", "rmi", image_name], capture_output=True) + +if __name__ == "__main__": + tags_to_test = get_filtered_quay_tags() + + if not tags_to_test: + print("โŒ No valid candidate tags found older than 2025.01.24.") + else: + print(f"โœ… Found {len(tags_to_test)} candidate images. Starting sequence...") + for tag in tags_to_test: + if run_isce3_cuda_test(tag): + print("\n" + "="*60) + print(f"๐Ÿ COMPATIBLE BASE IMAGE FOUND: {tag}") + print(f"Update your Dockerfile to: FROM {REGISTRY}/{REPO}:{tag}") + print("="*60) + sys.exit(0) + else: + print(f"โŒ Tag {tag} failed. Trying next oldest tag...") From e498c1e0971c3528ee466aa17247cd21a6dfdd75 Mon Sep 17 00:00:00 2001 From: grallewellyn Date: Tue, 3 Mar 2026 09:13:58 -0800 Subject: [PATCH 3/3] deleted python scripts for gpu images --- find_isce3_cuda_pytorch.py | 116 ---------------------------------- find_isce3_cuda_tensorflow.py | 114 --------------------------------- 2 files changed, 230 deletions(-) delete mode 100644 find_isce3_cuda_pytorch.py delete mode 100644 find_isce3_cuda_tensorflow.py diff --git a/find_isce3_cuda_pytorch.py b/find_isce3_cuda_pytorch.py deleted file mode 100644 index ebd6f43..0000000 --- a/find_isce3_cuda_pytorch.py +++ /dev/null @@ -1,116 +0,0 @@ -import requests -import subprocess -import re -import os -import sys - -# Constants for the Quay repository -REGISTRY = "quay.io" -REPO = "pangeo/pytorch-notebook" -# Base API URL for tags -BASE_API_URL = f"https://quay.io/api/v1/repository/{REPO}/tag/" - -def get_filtered_quay_tags(): - """Fetches ALL tags using Quay.io pagination and filters them.""" - print(f"๐Ÿ” Fetching ALL tags from {REGISTRY}/{REPO} (this may take a moment)...") - all_tags = [] - page = 1 - has_additional = True - - # Filtering parameters - cutoff_date = "2026.05.02" - date_pattern = re.compile(r'^\d{4}\.\d{2}\.\d{2}$') - - try: - while has_additional: - # Quay API uses a 'page' parameter for pagination - response = requests.get(f"{BASE_API_URL}?page={page}") - if response.status_code != 200: - print(f"โŒ Failed to fetch page {page}: {response.status_code}") - break - - data = response.json() - tags_in_page = data.get('tags', []) - - for tag_obj in tags_in_page: - tag_name = tag_obj.get('name', '') - if date_pattern.match(tag_name): - if tag_name < cutoff_date: - all_tags.append(tag_name) - - # Check if there are more pages to fetch - has_additional = data.get('has_additional', False) - page += 1 - - if page % 5 == 0: - print(f" ...collected {len(all_tags)} date tags so far...") - - except Exception as e: - print(f"โŒ Error during API request: {e}") - - # Sort newest tags first to find the most modern working base image - all_tags.sort(reverse=True) - return all_tags - -def run_isce3_cuda_test(tag): - """Attempts to build a Docker image for amd64 and install isce3-cuda.""" - image_name = f"{REGISTRY}/{REPO}:{tag}" - isce3_version = "0.25.7" - platform = "linux/amd64" - - # Dockerfile logic with the critical CUDA override - dockerfile_content = f""" -FROM --platform={platform} {image_name} -USER root -ENV CONDA_OVERRIDE_CUDA="12.0" -SHELL ["/bin/bash", "-c"] -USER ${{NB_USER}} - -RUN conda update -y -n base conda && \\ - conda install -y -n notebook -c conda-forge isce3-cuda={isce3_version} && \\ - conda run -n notebook python -c "import isce3; print('ISCE3_CUDA_LOADED_SUCCESSFULLY')" -""" - - with open("TempCudaTest.Dockerfile", "w") as f: - f.write(dockerfile_content) - - print(f"\n--- ๐Ÿงช Testing Tag: {tag} (isce3-cuda {isce3_version}) ---") - - try: - # check=False ensures the script doesn't crash on build failure - result = subprocess.run([ - "docker", "build", - "--platform", platform, - "-f", "TempCudaTest.Dockerfile", - "--no-cache", - "-t", "isce3_cuda_probe", - "." - ], capture_output=False) - - return result.returncode == 0 - - finally: - if os.path.exists("TempCudaTest.Dockerfile"): - os.remove("TempCudaTest.Dockerfile") - subprocess.run(["docker", "rmi", "isce3_cuda_probe"], capture_output=True) - # Pulling amd64 images takes a lot of space; cleanup the base image after test - subprocess.run(["docker", "rmi", image_name], capture_output=True) - -if __name__ == "__main__": - tags_to_test = get_filtered_quay_tags() - - if not tags_to_test: - print("โŒ No valid candidate tags found older than cut off date") - else: - print(f"โœ… Found {len(tags_to_test)} candidate images. Starting sequence...") - print("tags to test are ") - print(tags_to_test) - for tag in tags_to_test: - if run_isce3_cuda_test(tag): - print("\n" + "="*60) - print(f"๐Ÿ COMPATIBLE BASE IMAGE FOUND: {tag}") - print(f"Update your Dockerfile to: FROM {REGISTRY}/{REPO}:{tag}") - print("="*60) - sys.exit(0) - else: - print(f"โŒ Tag {tag} failed. Trying next oldest tag...") diff --git a/find_isce3_cuda_tensorflow.py b/find_isce3_cuda_tensorflow.py deleted file mode 100644 index 50c9115..0000000 --- a/find_isce3_cuda_tensorflow.py +++ /dev/null @@ -1,114 +0,0 @@ -import requests -import subprocess -import re -import os -import sys - -# Constants for the Quay repository -REGISTRY = "quay.io" -REPO = "pangeo/ml-notebook" -# Base API URL for tags -BASE_API_URL = f"https://quay.io/api/v1/repository/{REPO}/tag/" - -def get_filtered_quay_tags(): - """Fetches ALL tags using Quay.io pagination and filters them.""" - print(f"๐Ÿ” Fetching ALL tags from {REGISTRY}/{REPO} (this may take a moment)...") - all_tags = [] - page = 1 - has_additional = True - - # Filtering parameters - cutoff_date = "2026.10.20" - date_pattern = re.compile(r'^\d{4}\.\d{2}\.\d{2}$') - - try: - while has_additional: - # Quay API uses a 'page' parameter for pagination - response = requests.get(f"{BASE_API_URL}?page={page}") - if response.status_code != 200: - print(f"โŒ Failed to fetch page {page}: {response.status_code}") - break - - data = response.json() - tags_in_page = data.get('tags', []) - - for tag_obj in tags_in_page: - tag_name = tag_obj.get('name', '') - if date_pattern.match(tag_name): - if tag_name < cutoff_date: - all_tags.append(tag_name) - - # Check if there are more pages to fetch - has_additional = data.get('has_additional', False) - page += 1 - - if page % 5 == 0: - print(f" ...collected {len(all_tags)} date tags so far...") - - except Exception as e: - print(f"โŒ Error during API request: {e}") - - # Sort newest tags first to find the most modern working base image - all_tags.sort(reverse=True) - return all_tags - -def run_isce3_cuda_test(tag): - """Attempts to build a Docker image for amd64 and install isce3-cuda.""" - image_name = f"{REGISTRY}/{REPO}:{tag}" - isce3_version = "0.25.7" - platform = "linux/amd64" - - # Dockerfile logic with the critical CUDA override - dockerfile_content = f""" -FROM --platform={platform} {image_name} -USER root -ENV CONDA_OVERRIDE_CUDA="12.0" -SHELL ["/bin/bash", "-c"] -USER ${{NB_USER}} - -RUN conda update -y -n base conda && \\ - conda install -y -n notebook -c conda-forge isce3-cuda={isce3_version} && \\ - conda run -n notebook python -c "import isce3; print('ISCE3_CUDA_LOADED_SUCCESSFULLY')" -""" - - with open("TempCudaTestTensorflow.Dockerfile", "w") as f: - f.write(dockerfile_content) - - print(f"\n--- ๐Ÿงช Testing Tag: {tag} (isce3-cuda {isce3_version}) ---") - - try: - # check=False ensures the script doesn't crash on build failure - result = subprocess.run([ - "docker", "build", - "--platform", platform, - "-f", "TempCudaTestTensorflow.Dockerfile", - "--no-cache", - "-t", "isce3_cuda_probe", - "." - ], capture_output=False) - - return result.returncode == 0 - - finally: - if os.path.exists("TempCudaTestTensorflow.Dockerfile"): - os.remove("TempCudaTestTensorflow.Dockerfile") - subprocess.run(["docker", "rmi", "isce3_cuda_probe"], capture_output=True) - # Pulling amd64 images takes a lot of space; cleanup the base image after test - subprocess.run(["docker", "rmi", image_name], capture_output=True) - -if __name__ == "__main__": - tags_to_test = get_filtered_quay_tags() - - if not tags_to_test: - print("โŒ No valid candidate tags found older than 2025.01.24.") - else: - print(f"โœ… Found {len(tags_to_test)} candidate images. Starting sequence...") - for tag in tags_to_test: - if run_isce3_cuda_test(tag): - print("\n" + "="*60) - print(f"๐Ÿ COMPATIBLE BASE IMAGE FOUND: {tag}") - print(f"Update your Dockerfile to: FROM {REGISTRY}/{REPO}:{tag}") - print("="*60) - sys.exit(0) - else: - print(f"โŒ Tag {tag} failed. Trying next oldest tag...")