Migrate to uv; fix clippings paths and wrapper
This commit is contained in:
parent
3347a242ef
commit
4df608c440
7 changed files with 5137 additions and 7 deletions
18
README.md
18
README.md
|
|
@ -30,20 +30,28 @@ ssearch/
|
|||
├── clippings/ # Symlink to clippings (PDFs, TXT, webarchive, RTF)
|
||||
├── store/ # Persisted journal vector store
|
||||
├── models/ # Cached HuggingFace models (offline)
|
||||
├── requirements.txt # Python dependencies
|
||||
├── pyproject.toml # Project metadata and dependencies (uv)
|
||||
├── uv.lock # Pinned dependency lockfile (uv)
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
**Prerequisites**: Python 3.12, [Ollama](https://ollama.com) with `gemma4:e4b` or similar pulled.
|
||||
**Prerequisites**: [uv](https://docs.astral.sh/uv/), [Ollama](https://ollama.com) with `gemma4:e4b` or similar pulled. uv manages the Python 3.12 toolchain and dependencies.
|
||||
|
||||
```bash
|
||||
cd ssearch
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
uv sync # create .venv and install the search pipeline
|
||||
uv sync --group notebook # also install Jupyter / analysis deps (optional)
|
||||
```
|
||||
|
||||
`uv sync` reads `pyproject.toml` and the pinned `uv.lock`, creating `.venv` automatically (no manual `python -m venv` or activation needed). Run any script with `uv run`:
|
||||
|
||||
```bash
|
||||
uv run python retrieve.py "your query"
|
||||
```
|
||||
|
||||
You can still `source .venv/bin/activate` and call `python` directly if you prefer.
|
||||
|
||||
The `data/` symlink should point to the journal archive (plain `.txt` files). The `clippings/` symlink should point to the clippings folder. The embedding model (`BAAI/bge-large-en-v1.5`) and cross-encoder (`cross-encoder/ms-marco-MiniLM-L-12-v2`) are cached in `./models/` for offline use.
|
||||
|
||||
### Offline model loading
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue