forked from StractOrg/stract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
40 lines (32 loc) · 1.41 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@dev *ARGS:
cd frontend && npm install
./scripts/run_dev.py {{ARGS}}
export RUST_LOG := env_var_or_default("RUST_LOG", "info,stract=debug")
export STRACT_CARGO_ARGS := env_var_or_default("STRACT_CARGO_ARGS", "")
@dev-api:
cargo watch -i frontend -x "run $STRACT_CARGO_ARGS -- api configs/api.toml"
@dev-search-server:
cargo watch -i frontend -x "run $STRACT_CARGO_ARGS -- search-server configs/search_server.toml"
@dev-entity-search-server:
cargo watch -i frontend -x "run $STRACT_CARGO_ARGS -- entity-search-server configs/entity_search_server.toml"
@dev-webgraph:
cargo watch -i frontend -x "run $STRACT_CARGO_ARGS -- webgraph server configs/webgraph/host_server.toml" && cargo watch -i frontend -x "run $STRACT_CARGO_ARGS -- webgraph server configs/webgraph/page_server.toml"
@dev-llm:
./.venv/bin/python3 -m llama_cpp.server --model data/mistral-7b-instruct-v0.2.Q4_K_M.gguf --port 4000
@dev-frontend:
cd frontend && npm run dev
@openapi:
cd frontend && npm run openapi
@setup *ARGS:
python3 -m venv .venv || true
@prepare_models:
just setup_python_env
./scripts/export_crossencoder
./scripts/export_dual_encoder
@configure *ARGS:
just setup {{ARGS}}
just prepare_models
RUST_LOG="none,stract=info" cargo run --release --all-features -- configure {{ARGS}}
@setup_python_env:
python3 -m venv .venv || true
.venv/bin/pip install -r scripts/requirements.txt