Commit
·
79130e1
1
Parent(s):
5fc2ced
Apply charles feedback
Browse filesCo-authored-by: Charles Frye <cfrye59@gmail.com>
- examples/README_MODAL.md +7 -4
examples/README_MODAL.md
CHANGED
|
@@ -4,24 +4,27 @@ This directory contains examples of running `marker` in different contexts.
|
|
| 4 |
|
| 5 |
### Usage with Modal
|
| 6 |
|
| 7 |
-
We have a [self-contained example](./
|
| 8 |
|
| 9 |
It's a limited example that you can extend into different use cases.
|
| 10 |
|
| 11 |
#### Pre-requisites
|
| 12 |
|
| 13 |
-
Make sure you have the `modal` client installed by [following their instructions here](https://modal.com/docs/guide#getting-started)
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
#### Running the example
|
| 16 |
|
| 17 |
Once `modal` is configured, you can deploy it to your workspace by running:
|
| 18 |
|
| 19 |
-
> modal deploy marker_modal_deployment.py
|
| 20 |
|
| 21 |
Notes:
|
| 22 |
- `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
|
| 23 |
|
| 24 |
-
> modal run
|
| 25 |
|
| 26 |
Which will create a [`Modal Volume`](https://modal.com/docs/guide/Volumes) to store them for re-use.
|
| 27 |
|
|
|
|
| 4 |
|
| 5 |
### Usage with Modal
|
| 6 |
|
| 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.
|
| 8 |
|
| 9 |
It's a limited example that you can extend into different use cases.
|
| 10 |
|
| 11 |
#### Pre-requisites
|
| 12 |
|
| 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.
|
| 17 |
|
| 18 |
#### Running the example
|
| 19 |
|
| 20 |
Once `modal` is configured, you can deploy it to your workspace by running:
|
| 21 |
|
| 22 |
+
> modal deploy marker_modal_deployment.py
|
| 23 |
|
| 24 |
Notes:
|
| 25 |
- `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
|
| 26 |
|
| 27 |
+
> modal run marker_modal_deployment.py::download_models
|
| 28 |
|
| 29 |
Which will create a [`Modal Volume`](https://modal.com/docs/guide/Volumes) to store them for re-use.
|
| 30 |
|