|
| 1 | +# 🪟 Running MMORE on Windows |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +MMORE was developed and tested mainly on Linux. It runs on Windows too, but a few things behave differently. This page lists those differences and the fix for each one. |
| 6 | + |
| 7 | +If you work on Linux or macOS, you can skip this page. |
| 8 | + |
| 9 | +## 1. Install the prerequisites |
| 10 | + |
| 11 | +Unlike most Linux distributions, Windows does not ship Python, Git, or FFmpeg. |
| 12 | +Install them first with |
| 13 | +[winget](https://learn.microsoft.com/windows/package-manager/winget/): |
| 14 | + |
| 15 | +```powershell |
| 16 | +winget install Python.Python.3.11 |
| 17 | +winget install Git.Git |
| 18 | +winget install astral-sh.uv |
| 19 | +winget install Gyan.FFmpeg |
| 20 | +``` |
| 21 | + |
| 22 | +Then clone the repo and install MMORE into a virtual environment: |
| 23 | + |
| 24 | +```powershell |
| 25 | +git clone https://github.com/swiss-ai/mmore.git |
| 26 | +cd mmore |
| 27 | +uv venv |
| 28 | +.venv\Scripts\activate |
| 29 | +uv pip install -e ".[all,cu126]" |
| 30 | +``` |
| 31 | + |
| 32 | +Use `cu126` for an NVIDIA GPU, or `cpu` otherwise. See the |
| 33 | +[README](https://github.com/swiss-ai/mmore#step-1--install-mmore) for the full |
| 34 | +list of extras. |
| 35 | + |
| 36 | +## 2. `milvus-lite` is not available on Windows |
| 37 | + |
| 38 | +Every example config whose `db.uri` is `./proc_demo.db` relies on `milvus-lite` |
| 39 | +(`examples/index/config.yaml`, `examples/retriever_api/config.yaml`, |
| 40 | +`examples/rag/config.yaml`, `examples/rag/config_api.yaml`). There is no Windows |
| 41 | +build of `milvus-lite`, so any of them fails with: |
| 42 | + |
| 43 | +``` |
| 44 | +ModuleNotFoundError: No module named 'milvus_lite' |
| 45 | +``` |
| 46 | + |
| 47 | +### Fix: run Milvus in Docker |
| 48 | + |
| 49 | +This repo ships no Compose file, so download the official Milvus standalone one |
| 50 | +matching your installed `pymilvus` version (see the |
| 51 | +[Milvus install docs](https://milvus.io/docs/install_standalone-docker-compose.md)): |
| 52 | + |
| 53 | +```powershell |
| 54 | +# Download the Milvus docker compose file from GitHub |
| 55 | +Invoke-WebRequest ` |
| 56 | + -Uri "https://github.com/milvus-io/milvus/releases/download/v2.6.6/milvus-standalone-docker-compose.yml" ` |
| 57 | + -OutFile "milvus-docker-compose.yml" |
| 58 | +# Start Milvus containers |
| 59 | +docker compose -f milvus-docker-compose.yml up -d |
| 60 | +``` |
| 61 | + |
| 62 | +Wait about a minute, then check `docker ps` shows the three containers |
| 63 | +(`etcd`, `minio`, `milvus-standalone`) as `(healthy)`. |
| 64 | + |
| 65 | +### Create the database |
| 66 | + |
| 67 | +MMORE does not create the database automatically when connecting to a remote Milvus. Run this once: |
| 68 | + |
| 69 | +```powershell |
| 70 | +python -c "from pymilvus import connections, db; connections.connect(uri='http://127.0.0.1:19530'); db.create_database('my_db')" |
| 71 | +``` |
| 72 | + |
| 73 | +### Point the configs at the Docker instance |
| 74 | + |
| 75 | +The `db` block lives at a different level depending on the config. Change |
| 76 | +`uri: ./proc_demo.db` to `uri: http://127.0.0.1:19530` in each one you use. |
| 77 | + |
| 78 | +`examples/retriever_api/config.yaml` (and `examples/rag/config*.yaml`) — `db` |
| 79 | +is at the root: |
| 80 | + |
| 81 | +```yaml |
| 82 | +db: |
| 83 | + uri: http://127.0.0.1:19530 |
| 84 | + name: my_db |
| 85 | +``` |
| 86 | +
|
| 87 | +`examples/index/config.yaml` — `db` is nested under `indexer`: |
| 88 | + |
| 89 | +```yaml |
| 90 | +indexer: |
| 91 | + db: |
| 92 | + uri: http://127.0.0.1:19530 |
| 93 | + name: my_db |
| 94 | +``` |
| 95 | + |
| 96 | +### Check that the setup works |
| 97 | + |
| 98 | +Once Milvus is running, confirm the connection: |
| 99 | + |
| 100 | +```powershell |
| 101 | +python -c "from pymilvus import MilvusClient; c = MilvusClient(uri='http://127.0.0.1:19530', db_name='my_db'); print(c.list_collections())" |
| 102 | +``` |
| 103 | + |
| 104 | +This returns a list of collections (empty before you index anything). |
| 105 | + |
| 106 | +## 3. Surya OCR can crash the process on large PDFs |
| 107 | + |
| 108 | +When processing large PDFs, the surya-based OCR may crash with: |
| 109 | + |
| 110 | +``` |
| 111 | +Process finished with exit code 0xC0000005 |
| 112 | +``` |
| 113 | + |
| 114 | +This is a hard crash inside a native dependency. On Windows, use the fast processors instead, which rely on PyMuPDF rather than surya. |
| 115 | + |
| 116 | +In your `process` config, `use_fast_processors` goes under `dispatcher_config`: |
| 117 | + |
| 118 | +```yaml |
| 119 | +dispatcher_config: |
| 120 | + use_fast_processors: true |
| 121 | +``` |
| 122 | + |
| 123 | +You lose some accuracy on heavily scanned PDFs, but the pipeline no longer crashes. |
| 124 | + |
| 125 | +## See also |
| 126 | + |
| 127 | +- [Installation](installation.md) |
| 128 | +- [Quickstart](quickstart.md) |
0 commit comments