Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ploomber-cloud resources #203

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion doc/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,34 @@ ploomber-cloud deploy
The command-line interface will automatically read and encrypt your secrets and include them in the deployment.
For security reasons, your `.env` file is replaced with an empty file at runtime. Ploomber only stores your encrypted secrets.

To learn how to read your secrets from within your application, see [Reading secrets.](./secrets.md)
To learn how to read your secrets from within your application, see [Reading secrets.](./secrets.md)


## Configure resources

You can customize the amount of `CPUs`, `RAM`, and `GPUs` that your project will use with this command:

```sh
ploomber-cloud resources
```

If your `ploomber-cloud.json` file already has a `resources` section, you can reconfigure with the `--force` flag:

```sh
ploomber-cloud resources --force
```

### Carrying over resources

When you initialize a project using `--force` or `--from-existing`, your resources are carried over.

`ploomber-cloud init --force` will carry over the resources from the `ploomber-cloud.json` file.

`ploomber-cloud init --from-existing` and `ploomber-cloud init --from-existing --force` will carry over the resources that the project was most recently deployed with.

If you run any of these commands, be sure to double check your resources by checking the `ploomber-cloud.json` or running `ploomber-cloud resources`.
You can easily reconfigure them with:

```sh
ploomber-cloud resources --force
```
27 changes: 27 additions & 0 deletions doc/user-guide/gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,30 @@ Then, in the deployment form, select `1 GPU` in the `Advanced` section:

Currently, only `1 GPU` is supported, which will deploy your application on a
machine with an NVIDIA T4 (16GB), 4 CPUs and 16 GB of RAM.

## Using the CLI

You can also deploy your project with a GPU using the command-line interface. Set your API key and initialize your project:

```sh
ploomber-cloud key YOURKEY
ploomber-cloud init
```

Now, configure your resources:

```sh
ploomber-cloud resources
```

When you select `1 GPU`, CPU and RAM are fixed at `4 CPUs` and `16 GB RAM`.

Finally deploy your project:

```sh
ploomber-cloud deploy --watch
```

For more info on configuring resources in the CLI, [click here](../user-guide/cli.md#configure-resources)


27 changes: 26 additions & 1 deletion doc/user-guide/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,29 @@ If you want to increase or reduce the resources provisioned for an existing appl

![](../static/resources/redeploy.png)

You'll need to provide the source code again. In the last section, you'll be able to choose the resources to provision.
You'll need to provide the source code again. In the last section, you'll be able to choose the resources to provision.

## Configure via the CLI

To configure resources via the command-line interface, first set your API key and initialize your project:

```sh
ploomber-cloud key YOURKEY
ploomber-cloud init
```

Then simply run:

```sh
ploomber-cloud resources
```

You'll be prompted to select number of `GPUs`, `CPUs` and `RAM`.

Finally deploy your project and see that your resources have been customized:

```sh
ploomber-cloud deploy --watch
```

For more info on configuring resources in the CLI, [click here](../user-guide/cli.md#configure-resources)