From 25db50b8439e3590a5bba518adb5d1034595b691 Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 23 Nov 2023 17:08:33 +0000 Subject: [PATCH] Update examples to use Python 3.9 (#330) Add array-api-compat to dependencies for Modal Add modal-gcp to extras --- cubed/runtime/executors/modal.py | 2 ++ examples/lithops/aws-lambda/README.md | 2 +- examples/lithops/aws-lambda/docker/Dockerfile_aws_lambda | 4 ++-- examples/lithops/gcf/README.md | 2 +- pyproject.toml | 5 +++++ requirements.txt | 1 + 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cubed/runtime/executors/modal.py b/cubed/runtime/executors/modal.py index bd71b93d..59db495a 100644 --- a/cubed/runtime/executors/modal.py +++ b/cubed/runtime/executors/modal.py @@ -26,6 +26,7 @@ else: aws_image = modal.Image.debian_slim().pip_install( [ + "array-api-compat", "fsspec", "mypy_extensions", # for rechunker "networkx", @@ -38,6 +39,7 @@ ) gcp_image = modal.Image.debian_slim().pip_install( [ + "array-api-compat", "fsspec", "mypy_extensions", # for rechunker "networkx", diff --git a/examples/lithops/aws-lambda/README.md b/examples/lithops/aws-lambda/README.md index d616fa7b..4b00857e 100644 --- a/examples/lithops/aws-lambda/README.md +++ b/examples/lithops/aws-lambda/README.md @@ -10,7 +10,7 @@ 1. Install a Python environment with the basic package requirements: ```shell -conda create --name cubed-lithops-aws-examples -y python=3.8 +conda create --name cubed-lithops-aws-examples -y python=3.9 conda activate cubed-lithops-aws-examples pip install -r requirements.txt # use requirements file from same directory as this readme ``` diff --git a/examples/lithops/aws-lambda/docker/Dockerfile_aws_lambda b/examples/lithops/aws-lambda/docker/Dockerfile_aws_lambda index a0e50583..b3f44ad2 100644 --- a/examples/lithops/aws-lambda/docker/Dockerfile_aws_lambda +++ b/examples/lithops/aws-lambda/docker/Dockerfile_aws_lambda @@ -5,10 +5,10 @@ #FROM python:3.7-slim-buster # Python 3.8 -FROM python:3.8-slim-buster +#FROM python:3.8-slim-buster # Python 3.9 -#FROM python:3.9-slim-buster +FROM python:3.9-slim-buster # Python 3.10 # FROM python:3.10-slim-buster diff --git a/examples/lithops/gcf/README.md b/examples/lithops/gcf/README.md index e25397c4..733904f5 100644 --- a/examples/lithops/gcf/README.md +++ b/examples/lithops/gcf/README.md @@ -10,7 +10,7 @@ ```shell # from this directory -conda create --name cubed-lithops-gcf-examples -y python=3.8 +conda create --name cubed-lithops-gcf-examples -y python=3.9 conda activate cubed-lithops-gcf-examples pip install -r requirements.txt # use requirements file from same directory as this readme ``` diff --git a/pyproject.toml b/pyproject.toml index ae72c66a..198db725 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,11 @@ modal = [ "modal-client", "s3fs", ] +modal-gcp = [ + "cubed[diagnostics]", + "modal-client", + "gcsfs", +] coiled = [ "cubed[diagnostics]", "coiled", diff --git a/requirements.txt b/requirements.txt index dc6174b7..381ac93c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ # https://help.github.com/en/github/visualizing-repository-data-with-graphs/listing-the-packages-that-a-repository-depends-on aiostream +array-api-compat fsspec mypy_extensions # for rechunker networkx < 2.8.3