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: examples/README_MODAL.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,26 +4,29 @@ This directory contains examples of running `marker` in different contexts.
4
4
5
5
### Usage with Modal
6
6
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.
8
8
9
9
It's a limited example that you can extend into different use cases.
10
10
11
11
#### Pre-requisites
12
12
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.
14
17
15
18
#### Running the example
16
19
17
20
Once `modal` is configured, you can deploy it to your workspace by running:
-`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
26
24
-
> modal run --env <YOUR_MODAL_ENV> modal_deployment.py::download_models
27
+
> modal run marker_modal_deployment.py::download_models
25
28
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.
27
30
28
31
Once the deploy is finished, you can:
29
32
- 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