Skip to content

Commit e1886f6

Browse files
authored
Add option to run examples on Lithops AWS lambda with obstore (#778)
1 parent 94ed51f commit e1886f6

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

examples/lithops/aws/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
conda create --name cubed-lithops-aws-examples -y python=3.11
1414
conda activate cubed-lithops-aws-examples
1515
pip install 'cubed[lithops-aws]'
16+
# or for obstore:
17+
pip install 'cubed[diagnostics]' 'lithops[aws]' obstore
1618
```
1719

1820
2. Configure Lithops with an [AWS Lambda compute backend](https://lithops-cloud.github.io/docs/source/compute_config/aws_lambda.html), and an [AWS S3 storage backend](https://lithops-cloud.github.io/docs/source/storage_config/aws_s3.html).
@@ -23,6 +25,7 @@ pip install 'cubed[lithops-aws]'
2325
- Note: if you are building on an arm64 machine (e.g. Apple Silicon) then make sure that your Lithops config file contains `architecture: arm64` under the `aws_lambda` section.
2426

2527
```shell
28+
# Note: change `s3fs` to `obstore` in the docker file to use obstore instead of fsspec
2629
lithops runtime build -b aws_lambda -f docker/Dockerfile_aws_lambda cubed-runtime
2730
lithops runtime deploy -b aws_lambda --memory 2000 --timeout 180 cubed-runtime # optional, will be done automatically on first use
2831
```
@@ -33,12 +36,22 @@ lithops runtime deploy -b aws_lambda --memory 2000 --timeout 180 cubed-runtime #
3336
ulimit -n 1024
3437
```
3538

39+
6. [Obstore only] Set AWS env variables
40+
41+
```shell
42+
export AWS_ACCESS_KEY_ID=...
43+
export AWS_SECRET_ACCESS_KEY=...
44+
export AWS_REGION=...
45+
```
46+
3647
## Running
3748

3849
Before running the examples, first change to the top-level examples directory (`cd ../..`) and type
3950

4051
```shell
4152
export CUBED_CONFIG=$(pwd)/lithops/aws
53+
# or for obstore:
54+
export CUBED_CONFIG=$(pwd)/lithops/aws/cubed-obstore.yaml
4255
```
4356

4457
Then you can run the examples in the [docs](https://cubed-dev.github.io/cubed/examples/index.html).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
spec:
2+
work_dir: "s3://cubed-$USER-temp"
3+
allowed_mem: "2GB"
4+
executor_name: "lithops"
5+
executor_options:
6+
runtime: "cubed-runtime"
7+
runtime_memory: 2000
8+
storage_options:
9+
use_obstore: true

0 commit comments

Comments
 (0)