|
1 | 1 | # pytc-client |
2 | 2 |
|
3 | | -## Quickstart (uv workflow) |
| 3 | +## Recommended Setup (uv) |
| 4 | + |
| 5 | +We strongly recommend using [uv](https://docs.astral.sh/uv/) because it bundles Python 3.11, installs dependencies in seconds, and keeps the workflow to two commands. |
4 | 6 |
|
5 | 7 | **Prerequisites** |
6 | | -- [uv](https://docs.astral.sh/uv/) (bundles Python and virtualenv management) |
| 8 | +- [git](https://git-scm.com/) |
| 9 | +- [uv](https://docs.astral.sh/uv/) |
7 | 10 | - [Node.js](https://nodejs.org/) 18+ (includes npm) |
8 | 11 |
|
9 | | -Clone the repository and run the bootstrap script once to install everything (Python 3.11 environment, pytorch_connectomics checkout, npm packages): |
| 12 | +### 1. Bootstrap (one-time) |
10 | 13 |
|
11 | 14 | ```bash |
12 | | -./scripts/bootstrap.sh # macOS / Linux |
13 | | -scripts\bootstrap.ps1 # Windows (PowerShell) |
| 15 | +./scripts/bootstrap.sh # macOS / Linux |
| 16 | +scripts\bootstrap.ps1 # Windows PowerShell |
14 | 17 | ``` |
15 | 18 |
|
16 | | -Launch the full stack (both FastAPI services + Electron client) with a single command: |
| 19 | +### 2. Launch the full stack |
17 | 20 |
|
18 | 21 | ```bash |
19 | | -./start.sh # macOS / Linux |
20 | | -start.bat # Windows (CMD) |
| 22 | +./start.sh # macOS / Linux |
| 23 | +start.bat # Windows CMD |
21 | 24 | ``` |
22 | 25 |
|
23 | | -The launcher keeps the API services running while Electron is open and cleans them up when you exit. |
| 26 | +This starts both FastAPI services under uv, runs the Electron client, and cleans up the servers when you close the UI. Re-run the bootstrap script any time you need to refresh dependencies. |
| 27 | + |
| 28 | +## Legacy Manual Setup (without uv) |
| 29 | + |
| 30 | +If you prefer to manage Python environments yourself, follow the steps below. Expect a slower install and more moving pieces. |
| 31 | + |
| 32 | +**Prerequisites** |
| 33 | +- Python 3.9–3.11 (conda, pyenv, or system Python) |
| 34 | +- [git](https://git-scm.com/) |
| 35 | +- [Node.js](https://nodejs.org/) 18+ (includes npm) |
| 36 | + |
| 37 | +1. **Create / activate an environment** |
| 38 | + ```bash |
| 39 | + python -m venv .venv |
| 40 | + source .venv/bin/activate # Windows: .\.venv\Scripts\activate |
| 41 | + ``` |
| 42 | +2. **Install backend dependencies** |
| 43 | + ```bash |
| 44 | + pip install -r server_api/requirements.txt |
| 45 | + ``` |
| 46 | +3. **Download & install pytorch_connectomics** |
| 47 | + ```bash |
| 48 | + ./setup_pytorch_connectomics.sh |
| 49 | + pip install -e pytorch_connectomics |
| 50 | + ``` |
| 51 | +4. **Install frontend dependencies** |
| 52 | + ```bash |
| 53 | + cd client |
| 54 | + npm install |
| 55 | + cd .. |
| 56 | + ``` |
| 57 | +5. **Run the app (three terminals or background processes)** |
| 58 | + ```bash |
| 59 | + python server_api/main.py |
| 60 | + python server_pytc/main.py |
| 61 | + cd client && npm run electron |
| 62 | + ``` |
| 63 | + |
| 64 | +## Video Demo |
| 65 | +[Video walkthrough](https://www.loom.com/share/45c09b36bf37408fb3e5a9172e427deb?sid=2777bf8f-a705-4d47-b17a-adf882994168) |
0 commit comments