Add Setup and Installation
parent
8ce997fe3b
commit
e3f0c31d94
102
Setup-and-Installation.md
Normal file
102
Setup-and-Installation.md
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Setup and Installation
|
||||||
|
|
||||||
|
This page covers local setup for the Python baseline and optional C# migration workspace.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Python `3.14`
|
||||||
|
- `pip` and virtual environment support
|
||||||
|
- Windows or Linux
|
||||||
|
- Optional: GPU drivers/toolkit if using `requirements_gpu.txt`
|
||||||
|
|
||||||
|
## Dependency Profiles
|
||||||
|
|
||||||
|
- `requirements_base.txt`: shared runtime dependencies
|
||||||
|
- `requirements_cpu_only.txt`: base + CPU AI stack
|
||||||
|
- `requirements_gpu.txt`: base + GPU AI stack
|
||||||
|
- `requirements_nlp_optional.txt`: optional spaCy backend
|
||||||
|
|
||||||
|
## Windows Setup (CPU default)
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd Project_Journal
|
||||||
|
py -3.14 -m venv .venv
|
||||||
|
.\.venv\Scripts\Activate.ps1
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements_cpu_only.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
Run desktop app:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
python .\journal\run_desktop.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Linux Setup (CPU default)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd Project_Journal
|
||||||
|
python3.14 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements_cpu_only.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
Run desktop app:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python ./journal/run_desktop.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## Linux GPU Setup (optional)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd Project_Journal
|
||||||
|
python3.14 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install -r requirements_gpu.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## Optional NLP Backend (spaCy)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install -r requirements_nlp_optional.txt
|
||||||
|
python -m spacy download en_core_web_sm
|
||||||
|
```
|
||||||
|
|
||||||
|
NLP backend modes:
|
||||||
|
|
||||||
|
- `auto` (default): spaCy if available, fallback otherwise
|
||||||
|
- `spacy`: require spaCy and fail if unavailable
|
||||||
|
- `fallback`: always use fallback NLP heuristics
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$env:JOURNAL_NLP_BACKEND = "fallback"
|
||||||
|
python .\journal\run_desktop.py
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export JOURNAL_NLP_BACKEND=spacy
|
||||||
|
python ./journal/run_desktop.py
|
||||||
|
```
|
||||||
|
|
||||||
|
## C# Migration Workspace Setup (optional)
|
||||||
|
|
||||||
|
Location: `journal-master/journal/`
|
||||||
|
|
||||||
|
Use:
|
||||||
|
|
||||||
|
- `journal-master/journal/README.md`
|
||||||
|
- `journal-master/journal/MINIMAL_MACHINE_SETUP.md`
|
||||||
|
|
||||||
|
Quick check:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd journal-master/journal
|
||||||
|
./scripts/dotnet-min.ps1 restore Journal.Sidecar/Journal.Sidecar.csproj
|
||||||
|
./scripts/dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj
|
||||||
|
./scripts/dotnet-min.ps1 run --project Journal.SmokeTests/Journal.SmokeTests.csproj
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user