You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/api_stats.rst
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@ Execution summary plots
10
10
11
11
The :code:`plot()` method from :code:`FunctionExecutor` creates a scatter plot and a histogram plot showing a summary of the tasks executed by a :code:`FunctionExecutor`. By default, lithops creates a :code:`plots/` directory in the working directory path containing both plots in PNG format. For more details refer to the `FunctionExecutor API reference <https://lithops-cloud.github.io/docs/source/api_futures.html>`_.
12
12
13
+
To get started, first install Lithops and the plotting dependencies with:
14
+
15
+
.. code-block:: bash
16
+
17
+
python3 -m pip install lithops[plotting]
18
+
13
19
* **Scatter Plot**: the scatter plot shows a timeline on the horizontal axis where the stages of all invocations are arranged on the vertical axis.
14
20
- :code:`host submit` indicates the time that the orchestrator process has invoked the function.
15
21
- :code:`call start` indicates the timestamp at which the function starts its execution.
Copy file name to clipboardExpand all lines: docs/source/compute_config/code_engine.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,13 @@
2
2
3
3
[IBM Code Engine](https://cloud.ibm.com/codeengine/overview) allows you to run your application, job or container on a managed serverless platform. Auto-scale workloads and only pay for the resources you consume.
4
4
5
-
IBM Code Engine exposes both Knative and Kubernetes Job Descriptor API. Lithops supports both of them. Follow IBM Code Engine documentation to get more details on the difference between those APIs.
5
+
## Installation
6
6
7
+
1. Install IBM Cloud backend dependencies:
8
+
9
+
```bash
10
+
python3 -m pip install lithops[ibm]
11
+
```
7
12
8
13
## Configuration
9
14
@@ -13,7 +18,7 @@ IBM Code Engine exposes both Knative and Kubernetes Job Descriptor API. Lithops
13
18
14
19
3. Copy the generated IAM API key (You can only see the key the first time you create it, so make sure to copy it).
15
20
16
-
4.Naviagete to the [resource groups dashboard](https://cloud.ibm.com/account/resource-groups), and copy the desired resource group ID.
21
+
4.Navigate to the [resource groups dashboard](https://cloud.ibm.com/account/resource-groups), and copy the desired resource group ID.
17
22
18
23
5. Edit your lithops config and add the following keys:
|ibm_cf| namespace | |no | Value of CURRENT NAMESPACE from [here](https://cloud.ibm.com/functions/namespace-settings). Provide it if you want to use an existsing `namespace`. Lithops will automatically create a new namespace if not provided.|
54
-
|ibm_cf| namespace_id | |no | Value of 'GUID' from [here](https://cloud.ibm.com/functions/namespace-settings). Provide it if you want to use an existsing `namespace`. Provide it along with `namespace`.|
53
+
|ibm_cf| namespace | |no | Value of CURRENT NAMESPACE from [here](https://cloud.ibm.com/functions/namespace-settings). Provide it if you want to use an existing `namespace`. Lithops will automatically create a new namespace if not provided.|
54
+
|ibm_cf| namespace_id | |no | Value of 'GUID' from [here](https://cloud.ibm.com/functions/namespace-settings). Provide it if you want to use an existing `namespace`. Provide it along with `namespace`.|
55
55
|ibm_cf | region | |no | Service region. One of: `jp-tok`, `au-syd`, `eu-gb`, `eu-de`, `us-south`, `us-east`. Lithops will use the `region` set under the `ibm` section if it is not set here |
56
56
|ibm_cf| endpoint | |no | IBM Cloud Functions endpoint (if region not provided). Make sure to use https:// prefix, for example: https://us-east.functions.cloud.ibm.com |
57
57
|ibm_cf | max_workers | 1200 | no | Max number of workers per `FunctionExecutor()`|
Copy file name to clipboardExpand all lines: docs/source/compute_config/ibm_vpc.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,21 @@
2
2
3
3
The IBM VPC client of Lithops can provide a truely serverless user experience on top of IBM VPC where Lithops creates new VSIs (Virtual Server Instance) dynamically in runtime, and scale Lithops jobs against them. Alternatively Lithops can start and stop an existing VSI instances.
4
4
5
+
## Installation
6
+
7
+
1. Install IBM Cloud backend dependencies:
8
+
9
+
```bash
10
+
python3 -m pip install lithops[ibm]
11
+
```
12
+
5
13
## IBM VPC
6
14
The assumption that you already familiar with IBM Cloud, have your IBM IAM API key created (you can create new keys [here](https://cloud.ibm.com/iam/apikeys)), have valid IBM COS account, region and resource group.
7
15
8
-
Follow [IBM VPC setup](https://cloud.ibm.com/vpc-ext/overview) if you need to create IBM Virtual Private Cloud. Decide the region for your VPC. The best practice is to use the same region both for VPC and IBM COS, hoewever there is no requirement to keep them in the same region.
16
+
Follow [IBM VPC setup](https://cloud.ibm.com/vpc-ext/overview) if you need to create IBM Virtual Private Cloud. Decide the region for your VPC. The best practice is to use the same region both for VPC and IBM COS, however there is no requirement to keep them in the same region.
9
17
10
18
## Choose an operating system image for VSI
11
-
Any Virtual Service Instance (VSI) need to define the instance’s operating system and version. Lithops support both standard Ubuntu operting system choices provided by the VPC and using pre-defined custom images that already contains all dependencies required by Lithops.
19
+
Any Virtual Service Instance (VSI) need to define the instance’s operating system and version. Lithops support both standard Ubuntu operating system choices provided by the VPC and using pre-defined custom images that already contains all dependencies required by Lithops.
12
20
13
21
- Option 1: Lithops is compatible with any Ubuntu 22.04 image provided in IBM Cloud. In this case, no further action is required and you can continue to the next step. Lithops will install all required dependencies in the VSI by itself. Notice this can consume about 3 min to complete all installations.
14
22
@@ -81,7 +89,7 @@ ibm_vpc:
81
89
|ibm_vpc | subnet_id | | no | Subnet id of an existing VPC. Get it from [here](https://cloud.ibm.com/vpc-ext/network/subnets)|
82
90
|ibm_vpc | ssh_key_id | | no | SSH public key id. Get it from [here](https://cloud.ibm.com/vpc-ext/compute/sshKeys)|
83
91
|ibm_vpc | gateway_id | | no | Gateway id. Get it from [here](https://cloud.ibm.com/vpc-ext/network/publicGateways)|
84
-
|ibm_vpc | image_id | | no | Virtual machine image id. Default is Ubutnu Server 22.04 |
92
+
|ibm_vpc | image_id | | no | Virtual machine image id. Default is Ubuntu Server 22.04 |
85
93
|ibm_vpc | runtime | python3 | no | Runtime name to run the functions. Can be a container image name. If not set Lithops will use the default python3 interpreter of the VM |
86
94
|ibm_vpc | ssh_username | root |no | Username to access the VM |
87
95
|ibm_vpc | ssh_password | |no | Password for accessing the worker VMs. If not provided, it is created randomly|
@@ -91,15 +99,15 @@ ibm_vpc:
91
99
|ibm_vpc | worker_profile_name | cx2-2x4 | no | Profile name for the worker VMs |
92
100
|ibm_vpc | master_profile_name | cx2-2x4 | no | Profile name for the master VM |
93
101
|ibm_vpc | verify_resources | True | no | Verify the resources that are stored in the local cache, and expected to be already created (VPC, subnet, floating IP, etc.), exist every time a `FunctionExecutor()` is created |
94
-
|ibm_vpc | delete_on_dismantle | True | no | Delete the worekr VMs when they are stopped |
102
+
|ibm_vpc | delete_on_dismantle | True | no | Delete the worker VMs when they are stopped |
95
103
|ibm_vpc | max_workers | 100 | no | Max number of workers per `FunctionExecutor()`|
96
104
|ibm_vpc | worker_processes | AUTO | no | Number of Lithops processes within a given worker. This is used to parallelize function activations within a worker. By default it detects the amount of CPUs in the worker VM|
97
105
|ibm_vpc | auto_dismantle | True |no | If False then the VM is not stopped automatically.|
98
106
|ibm_vpc | soft_dismantle_timeout | 300 |no| Time in seconds to stop the VM instance after a job **completed** its execution |
99
107
|ibm_vpc | hard_dismantle_timeout | 3600 | no | Time in seconds to stop the VM instance after a job **started** its execution |
100
108
|ibm_vpc | exec_mode | reuse | no | One of: **consume**, **create** or **reuse**. If set to **create**, Lithops will automatically create new VMs for each map() call based on the number of elements in iterdata. If set to **reuse** will try to reuse running workers if exist |
101
109
|ibm_vpc | singlesocket | False | no | Try to allocate workers with single socket CPU. If eventually running on multiple socket, a warning message printed to user. Is **True** standalone **workers_policy** must be set to **strict** to trace workers states|
102
-
|ibm_vpc | gpu | False | no | If True docker started with gpu support. Requires host to have neccessary hardware and software preconfigured and docker image runtime with gpu support specified |
110
+
|ibm_vpc | gpu | False | no | If `True` docker started with gpu support. Requires host to have necessary hardware and software pre-configured, and docker image runtime with gpu support specified |
103
111
104
112
## Lithops and the VSI consume mode
105
113
@@ -146,11 +154,11 @@ If you need to create new VM, then follow the steps to create and update Lithops
146
154
|---|---|---|---|---|
147
155
|ibm_vpc | region | |yes | VPC Region. For example `us-south`. Choose one region from [here](https://cloud.ibm.com/docs/vpc?topic=vpc-service-endpoints-for-vpc). Lithops will use the region set under the `ibm` section if it is not set here |
148
156
|ibm_vpc | instance_id | | yes | virtual server instance ID |
149
-
|ibm_vpc | floating_ip | | yes | Floatting IP address atached to your VM instance|
157
+
|ibm_vpc | floating_ip | | yes | Floating IP address attached to your VM instance|
150
158
|ibm_vpc | ssh_username | root |no | Username to access the VM |
151
159
|ibm_vpc | ssh_key_filename | ~/.ssh/id_rsa | no | Path to the ssh key file provided to create the VM. It will use the default path if not provided |
152
160
|ibm_vpc | worker_processes | AUTO | no | Number of Lithops processes within a given worker. This is used to parallelize function activations within the worker. By default it detects the amount of CPUs in the VM|
153
-
|ibm_vpc | runtime | python3 | no | Runtime name to run the functions. Can be a container image name. If not set Lithops will use the defeuv python3 interpreter of the VM |
161
+
|ibm_vpc | runtime | python3 | no | Runtime name to run the functions. Can be a container image name. If not set Lithops will use the default `python3` interpreter of the VM |
154
162
|ibm_vpc | auto_dismantle | True |no | If False then the VM is not stopped automatically.|
155
163
|ibm_vpc | soft_dismantle_timeout | 300 |no| Time in seconds to stop the VM instance after a job **completed** its execution |
156
164
|ibm_vpc | hard_dismantle_timeout | 3600 | no | Time in seconds to stop the VM instance after a job **started** its execution |
@@ -174,7 +182,7 @@ lithops logs poll
174
182
175
183
## VM Management
176
184
177
-
Lithops for IBM VPC follows a Mater-Worker architecrue (1:N).
185
+
Lithops for IBM VPC follows a Mater-Worker architecture (1:N).
178
186
179
187
All the VMs, including the master VM, are automatically stopped after a configurable timeout (see hard/soft dismantle timeouts).
Copy file name to clipboardExpand all lines: docs/source/sklearn_joblib.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Distributed Scikit-learn / Joblib
3
3
4
4
Lithops supports running distributed scikit-learn programs by implementing a Lithops backend for joblib using Functions instead of local processes. This makes it easy to scale existing applications that use scikit-learn from a single node to a cluster.
5
5
6
-
To get started, first install Lithops and the joblib dependecies with:
6
+
To get started, first install Lithops and the joblib dependencies with:
The easiest apporach is to let Lithops to choose the right endpoint by itself. To enable this, just configure Lithops with the region name of your `storage_bucket`, as follows:
94
+
The easiest approach is to let Lithops to choose the right endpoint by itself. To enable this, just configure Lithops with the region name of your `storage_bucket`, as follows:
0 commit comments