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
Refer to the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/) for detailed instructions.
76
-
```
77
-
curl -LsSf https://astral.sh/uv/install.sh | sh
78
-
```
79
-
80
-
#### Step 3: Clone this repository
35
+
#### Step 1 – Install MMORE
81
36
82
-
```bash
83
-
git clone https://github.com/swiss-ai/mmore
84
-
cd mmore
85
-
```
86
-
87
-
#### Step 4: Install project and dependencies
37
+
To install the package simply run:
88
38
89
39
```bash
90
-
uv sync
40
+
pip install -e .
91
41
```
92
42
93
-
For CPU-only installation, use:
43
+
To install additional RAG-related dependencies, run:
94
44
95
45
```bash
96
-
uv sync --extra cpu
46
+
pip install -e '.[rag]'
97
47
```
98
48
99
-
#### Step 5: Run a test command
100
-
101
-
Activate the virtual environment before running commands:
49
+
> :warning: This is a big package with a lot of dependencies, so we recommend to use `uv` to handle `pip` installations. [Check our tutorial on uv](./docs/uv.md).
102
50
103
-
```bash
104
-
python -m venv .venv
105
-
source .venv/bin/activate
106
-
```
51
+
### Minimal Example
107
52
108
-
Alternatively, prepend each command with `uv run`:
53
+
You can use our predefined CLI commands to execute parts of the pipeline. Note that you might need to prepend `python -m` to the command if the package does not properly create bash aliases.
109
54
110
55
```bash
111
56
# Run processing
112
-
python -m mmore process --config-file examples/process/config.yaml
57
+
mmore process --config-file examples/process/config.yaml
113
58
114
59
# Run indexer
115
-
python -m mmore index --config-file examples/index/config.yaml
60
+
mmore index --config-file examples/index/config.yaml
*Note:* The `test_data` folder is mapped to `/app/test_data` inside the container, corresponding to the default path in `examples/process_config.yaml`.
66
+
You can also use our package in python code as shown here:
150
67
151
-
#### Step 4: Run the application inside the container
68
+
```python
69
+
from mmore.process.processors.pdf_processor import PDFProcessor
70
+
from mmore.process.processors.base import ProcessorConfig
71
+
from mmore.type import MultimodalSample
152
72
153
-
```bash
154
-
# Run processing
155
-
mmore process --config-file examples/process/config.yaml
**Note:** For manual installation without Docker, refer to the section below.
4
+
5
+
#### Step 1: Install Docker
6
+
7
+
Follow the official [Docker installation guide](https://docs.docker.com/get-started/get-docker/).
8
+
9
+
#### Step 2: Build the Docker image
10
+
11
+
```bash
12
+
docker build . --tag mmore
13
+
```
14
+
15
+
To build for CPU-only platforms (results in a smaller image size):
16
+
17
+
```bash
18
+
docker build --build-arg PLATFORM=cpu -t mmore .
19
+
```
20
+
21
+
#### Step 3: Start an interactive session
22
+
23
+
```bash
24
+
docker run -it -v ./test_data:/app/test_data mmore
25
+
```
26
+
27
+
*Note:* The `test_data` folder is mapped to `/app/test_data` inside the container, corresponding to the default path in `examples/process_config.yaml`.
0 commit comments