[PR #12287] docs(wsl): add WSL dev quickstart + helper script (serve-dev-wsl.sh) #12505

Open
opened 2025-11-12 16:37:31 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12287
Author: @lucasalencarxisto-stack
Created: 9/14/2025
Status: 🔄 Open

Base: mainHead: docs/wsl-dev-quickstart


📝 Commits (2)

  • d24456b docs(readme): clarify Windows + WSL install (run install.sh inside WSL, not PowerShell)
  • 1ec7578 docs(wsl): fix WSL dev quickstart content

📊 Changes

4 files changed (+77 additions, -0 deletions)

View changed files

📝 .gitignore (+6 -0)
📝 README.md (+9 -0)
docs/wsl-dev.md (+24 -0)
scripts/serve-dev-wsl.sh (+38 -0)

📄 Description

What & Why
Windows + WSL confuses many first-time contributors when spinning up a local dev server. This PR adds a tiny WSL dev quickstart and a helper script that runs a dev server on a separate port with an isolated models directory and CPU-only by default. It avoids clashing with the system service on 11434.

Changes

docs/wsl-dev.md — short WSL dev guide (uses port 11436, models in ~/.ollama-dev/models, OLLAMA_NUM_GPU=0, basic commands + quick troubleshooting).

scripts/serve-dev-wsl.sh — helper script with sensible defaults and exec of the local binary.

How to Test (WSL2 / Ubuntu 24.04, Go ≥ 1.21)

´´´ bash

build local binary

cd ~/code/ollama
GOFLAGS="" go build -o ./bin/ollama .

start dev server (port 11436, isolated models, CPU-only)

chmod +x scripts/serve-dev-wsl.sh
nohup ./scripts/serve-dev-wsl.sh > server.log 2>&1 &

verify the API

curl -s http://127.0.0.1:11436/api/version

point the client at the dev server

OLLAMA_HOST=127.0.0.1:11436 ./bin/ollama list
OLLAMA_HOST=127.0.0.1:11436 ./bin/ollama pull mistral
OLLAMA_HOST=127.0.0.1:11436 ./bin/ollama run mistral "WSL dev build ok?"

Notes

  • Leaves the official system service on 11434 untouched.

  • Keeps dev artifacts separate via ~/.ollama-dev/models.

  • Docs + script only; no core changes.

Checklist

  • scripts/serve-dev-wsl.sh added and marked executable.

  • docs/wsl-dev.md includes concise setup + troubleshooting.

  • Tested on WSL2 (Ubuntu 24.04), Go 1.24.6, CPU-only.

  • (Optional) Link to this doc from the main README.

  • (Optional) Reference related issue: Related to


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/12287 **Author:** [@lucasalencarxisto-stack](https://github.com/lucasalencarxisto-stack) **Created:** 9/14/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `docs/wsl-dev-quickstart` --- ### 📝 Commits (2) - [`d24456b`](https://github.com/ollama/ollama/commit/d24456b4806d13249c12d442a4f702f46a3f1f0a) docs(readme): clarify Windows + WSL install (run install.sh inside WSL, not PowerShell) - [`1ec7578`](https://github.com/ollama/ollama/commit/1ec7578720d045ef13f56f921fb1b89717bcbcca) docs(wsl): fix WSL dev quickstart content ### 📊 Changes **4 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+6 -0) 📝 `README.md` (+9 -0) ➕ `docs/wsl-dev.md` (+24 -0) ➕ `scripts/serve-dev-wsl.sh` (+38 -0) </details> ### 📄 Description What & Why Windows + WSL confuses many first-time contributors when spinning up a local dev server. This PR adds a tiny WSL dev quickstart and a helper script that runs a dev server on a separate port with an isolated models directory and CPU-only by default. It avoids clashing with the system service on 11434. Changes docs/wsl-dev.md — short WSL dev guide (uses port 11436, models in ~/.ollama-dev/models, OLLAMA_NUM_GPU=0, basic commands + quick troubleshooting). scripts/serve-dev-wsl.sh — helper script with sensible defaults and exec of the local binary. How to Test (WSL2 / Ubuntu 24.04, Go ≥ 1.21) ´´´ bash # build local binary cd ~/code/ollama GOFLAGS="" go build -o ./bin/ollama . # start dev server (port 11436, isolated models, CPU-only) chmod +x scripts/serve-dev-wsl.sh nohup ./scripts/serve-dev-wsl.sh > server.log 2>&1 & # verify the API curl -s http://127.0.0.1:11436/api/version # point the client at the dev server OLLAMA_HOST=127.0.0.1:11436 ./bin/ollama list OLLAMA_HOST=127.0.0.1:11436 ./bin/ollama pull mistral OLLAMA_HOST=127.0.0.1:11436 ./bin/ollama run mistral "WSL dev build ok?" Notes - Leaves the official system service on 11434 untouched. - Keeps dev artifacts separate via ~/.ollama-dev/models. - Docs + script only; no core changes. Checklist - scripts/serve-dev-wsl.sh added and marked executable. - docs/wsl-dev.md includes concise setup + troubleshooting. - Tested on WSL2 (Ubuntu 24.04), Go 1.24.6, CPU-only. - (Optional) Link to this doc from the main README. - (Optional) Reference related issue: Related to --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-12 16:37:31 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#12505