feat(scripts): start-ollama-compat.ps1 convenience wrapper#31
feat(scripts): start-ollama-compat.ps1 convenience wrapper#31sharpninja merged 1 commit intomainfrom
Conversation
Stops any real Ollama daemon (service + tray + stray processes), releases port 11434, then launches `dotnet run -- serve` with the given model. Ctrl+C cleanly stops the serve; original Ollama is not auto-restarted by design. pwsh scripts/start-ollama-compat.ps1 -Model data/models/x.gguf pwsh scripts/start-ollama-compat.ps1 -Model x.gguf -Port 11435 -BindHost 0.0.0.0 Params: -Model (required), -Port, -BindHost, -Configuration, -NoCors. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61132d1534
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Write-Section 'Stopping Ollama service (if present)' | ||
| $svc = Get-Service -Name 'Ollama' -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Validate repo before stopping local Ollama
The script begins shutting down the Ollama service/processes before confirming the current directory is a valid BitNetSharp checkout. In the wrong-directory or broken-checkout case, this kills the user's running Ollama daemon and only then throws at the later repo check, so the command fails without starting the replacement server. Please run the repo/project sanity check first so precondition failures are non-destructive.
Useful? React with 👍 / 👎.
Summary
PowerShell helper that stops any real Ollama daemon and starts BitNetSharp's Ollama-compat server on the same port.
Steps:
Ollamaif registeredollama*process (tray, daemon, GUI)dotnet run --project src/BitNetSharp.App -- servein foregroundCtrl+C cleanly stops the serve; real Ollama is NOT auto-restarted by design (user chose to swap).
Usage
Defaults: Port 11434, BindHost 127.0.0.1, Configuration Release.
🤖 Generated with Claude Code