Skip to content

Commit c5c154b

Browse files
committed
Merge branch 'feat/modal-marker-demo' of github.com:datalab-to/marker into feat/modal-marker-demo
2 parents 2dce51a + 5021d6b commit c5c154b

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

examples/README_MODAL.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@ This directory contains examples of running `marker` in different contexts.
44

55
### Usage with Modal
66

7-
We have a [self-contained example](./modal_deployment.py) that shows how you can quickly use [Modal](https://modal.com) to deploy `marker` by provisioning a container with a GPU, and expose that with an API so you can submit PDFs for conversion into Markdown, HTML, or JSON.
7+
We have a [self-contained example](./marker_modal_deployment.py) that shows how you can quickly use [Modal](https://modal.com) to deploy `marker` by provisioning a container with a GPU, and expose that with an API so you can submit PDFs for conversion into Markdown, HTML, or JSON.
88

99
It's a limited example that you can extend into different use cases.
1010

1111
#### Pre-requisites
1212

13-
Make sure you have the `modal` client installed by [following their instructions here](https://modal.com/docs/guide#getting-started)
13+
Make sure you have the `modal` client installed by [following their instructions here](https://modal.com/docs/guide#getting-started).
14+
15+
Modal's [Starter Plan](https://modal.com/pricing) includes $30 of free compute each month.
16+
Modal is [serverless](https://arxiv.org/abs/1902.03383), so you only pay for resources when you are using them.
1417

1518
#### Running the example
1619

1720
Once `modal` is configured, you can deploy it to your workspace by running:
1821

19-
> modal deploy marker_modal_deployment.py --env <YOUR_MODEL_ENV>
22+
> modal deploy marker_modal_deployment.py
2023
2124
Notes:
2225
- `marker` has a few models it uses. By default, the endpoint will check if these models are loaded and download them if not (first request will be slow). You can avoid this by running
2326

24-
> modal run --env <YOUR_MODAL_ENV> modal_deployment.py::download_models
27+
> modal run marker_modal_deployment.py::download_models
2528
26-
Which will create a [`Modal Volume`](https://modal.com/docs/reference/modal.Volume) to store them for re-use.
29+
Which will create a [`Modal Volume`](https://modal.com/docs/guide/Volumes) to store them for re-use.
2730

2831
Once the deploy is finished, you can:
2932
- Test a file upload locally through your CLI using an `invoke_conversion` command we expose through Modal's [`local_entrypoint`](https://modal.com/docs/reference/modal.App#local_entrypoint)

0 commit comments

Comments
 (0)