win setup md
This commit is contained in:
@@ -48,6 +48,102 @@ python3 -m venv .venv
|
|||||||
If `.venv/bin/meshnet-node` is missing, the editable install step did not finish
|
If `.venv/bin/meshnet-node` is missing, the editable install step did not finish
|
||||||
successfully. Re-run the `.venv/bin/pip install -e ...` command above inside WSL.
|
successfully. Re-run the `.venv/bin/pip install -e ...` command above inside WSL.
|
||||||
|
|
||||||
|
WSL2 is still useful for local development, but do not rely on it for the
|
||||||
|
"another machine connects back to this node" LAN case. WSL2 commonly sits behind
|
||||||
|
Windows NAT/port-proxy behavior and may not accept inbound traffic from other LAN
|
||||||
|
machines without extra host networking setup. We intentionally leave that unfixed
|
||||||
|
because it is useful for testing NAT/relay scenarios. If you just want to bring up
|
||||||
|
a Windows node that other machines can reach directly, run the node in native
|
||||||
|
Windows PowerShell instead.
|
||||||
|
|
||||||
|
### Native Windows PowerShell node (not WSL)
|
||||||
|
|
||||||
|
Use this when the tracker is on another machine and you want Windows to host a
|
||||||
|
reachable node on the LAN.
|
||||||
|
|
||||||
|
1. Install prerequisites on Windows:
|
||||||
|
- Python 3.11 or 3.12 from <https://www.python.org/downloads/windows/>
|
||||||
|
- Git for Windows from <https://git-scm.com/download/win>
|
||||||
|
|
||||||
|
2. Open **PowerShell** in the cloned repo and install the node packages:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Example repo path; adjust to wherever you cloned it
|
||||||
|
cd D:\DEV\workspace\REPOS\git.d-popov.com\neuron-tai
|
||||||
|
|
||||||
|
py -3 -m venv .venv
|
||||||
|
.\.venv\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
|
||||||
|
.\.venv\Scripts\pip.exe install -e packages\tracker -e packages\node -e packages\p2p -e packages\gateway -e packages\relay
|
||||||
|
|
||||||
|
# CPU-only PyTorch. For NVIDIA CUDA, use `pip install torch` instead.
|
||||||
|
.\.venv\Scripts\pip.exe install torch --index-url https://download.pytorch.org/whl/cpu
|
||||||
|
.\.venv\Scripts\pip.exe install transformers accelerate
|
||||||
|
|
||||||
|
.\.venv\Scripts\meshnet-node.exe --help
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Find the Windows LAN IP address:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
ipconfig
|
||||||
|
```
|
||||||
|
|
||||||
|
Use the IPv4 address on the active Ethernet/Wi-Fi adapter, for example
|
||||||
|
`192.168.0.42`. Avoid WSL/Docker/Hyper-V adapter addresses like `172.16.x.x`,
|
||||||
|
`172.17.x.x`, or other virtual adapter IPs.
|
||||||
|
|
||||||
|
4. Allow inbound traffic for the node port in Windows Firewall. Run PowerShell as
|
||||||
|
Administrator once:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
New-NetFirewallRule `
|
||||||
|
-DisplayName "Meshnet node 8005" `
|
||||||
|
-Direction Inbound `
|
||||||
|
-Action Allow `
|
||||||
|
-Protocol TCP `
|
||||||
|
-LocalPort 8005
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Start the Windows node from normal PowerShell. Replace the tracker and
|
||||||
|
advertised host values with your actual LAN addresses:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$env:HF_HOME = "D:\DEV\models"
|
||||||
|
|
||||||
|
.\.venv\Scripts\meshnet-node.exe start `
|
||||||
|
--tracker http://192.168.0.179:8081 `
|
||||||
|
--model-id Qwen/Qwen2.5-0.5B-Instruct `
|
||||||
|
--shard-start 12 --shard-end 23 `
|
||||||
|
--quantization bfloat16 `
|
||||||
|
--host 0.0.0.0 `
|
||||||
|
--advertise-host 192.168.0.42 `
|
||||||
|
--port 8005
|
||||||
|
```
|
||||||
|
|
||||||
|
`--host 0.0.0.0` binds the node to all Windows interfaces. `--advertise-host`
|
||||||
|
is what the tracker gives to other nodes, so it must be the Windows LAN IP that
|
||||||
|
the tracker and peer nodes can actually reach.
|
||||||
|
|
||||||
|
If you want verbose per-hop pipeline logs while debugging a split model, add
|
||||||
|
`--debug`. Leave it off for normal runs; otherwise every generated token logs
|
||||||
|
lines like:
|
||||||
|
|
||||||
|
```text
|
||||||
|
[node] pipeline hop 0: http://127.0.0.1:8005 start_layer=22
|
||||||
|
[node] pipeline hop 0 returned text=' token'
|
||||||
|
```
|
||||||
|
|
||||||
|
6. From the tracker machine, verify Windows is reachable:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl http://192.168.0.42:8005/v1/health
|
||||||
|
```
|
||||||
|
|
||||||
|
If that endpoint returns 404, that is okay: it still proves the TCP connection
|
||||||
|
reached the node process. If it times out or connection-refuses, check the
|
||||||
|
Windows Firewall rule, `--host 0.0.0.0`, the selected LAN IP, and that the node is
|
||||||
|
still running.
|
||||||
|
|
||||||
### Public tracker + WSS relay
|
### Public tracker + WSS relay
|
||||||
|
|
||||||
For internet nodes, expose one public HTTPS host and proxy these paths:
|
For internet nodes, expose one public HTTPS host and proxy these paths:
|
||||||
@@ -148,7 +244,7 @@ For gated models (Llama), run `huggingface-cli login` first.
|
|||||||
|
|
||||||
## Step 3 — Send an inference request (Terminal 3)
|
## Step 3 — Send an inference request (Terminal 3)
|
||||||
|
|
||||||
```bash
|
```bash Qwen2.5-0.5B-Instruct
|
||||||
curl -s http://localhost:8001/v1/chat/completions \
|
curl -s http://localhost:8001/v1/chat/completions \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
|
|||||||
Reference in New Issue
Block a user