Local Docker
Run the Compute API in a container on this PC and let Studio start, stop and inspect it. The local Studio remains the UI; the container supplies the API, model hosting and training process.
What runs locally
| Image | Contains | Use |
|---|---|---|
| sharpmind-compute:local | Compute API only | CPU local host; API on 8080. |
| sharpmind-server:gpu | Studio + Compute + GPU plugin | Local NVIDIA GPU, also used on remote hosts. |
Local Docker is optional. Chat, local inference and CPU training already work in the Studio process. Use a container when you want the same API/host contract as a remote machine, or when a local NVIDIA card should serve and train.
Build the image
Docker Desktop must be running. The local build uses the sibling SharpMind source tree, so no packages need to be published. Run from the folder that contains both repositories.
cd C:\path\to\repos
Copy-Item SharpMind.Studio\docker\local-context.dockerignore .dockerignore
# CPU Compute API
docker build -f SharpMind.Studio/docker/compute/Dockerfile.local `
-t sharpmind-compute:local .
# GPU server image (Studio + Compute + ilgpu)
docker build -f SharpMind.Studio/docker/server/Dockerfile.gpu.local `
-t sharpmind-server:gpu .
The GPU image is about 1.6 GB; the CPU compute image is about 250 MB. The CUDA libraries ship in the image, but the NVIDIA driver comes from the host runtime.
Add the host
- Settings → Providers → Compute → Add host → Local Docker.
- Name it, keep the Base URL http://127.0.0.1:8080, and press Generate for the token.
- Set the image: sharpmind-compute:local for CPU, or sharpmind-server:gpu for a local GPU.
- Set the port (default 8080).
- Tick GPU only when Docker has an NVIDIA runtime and you chose the GPU image.
- Save host.
Start and test
On the host card:
- Check shows whether Docker Desktop is running and what the container is doing.
- Start container recreates it with the saved image, token, port and data folder.
- Test calls /health and loads the model list.
- Logs shows the last lines from the container; Stop keeps the data folder.
The data folder lives under the Studio root, next to Compute\<container>. It is mounted at /data/SharpMind, so models and uploads survive a container recreation.
Local GPU
- Docker Desktop with WSL2 and the NVIDIA driver installed on Windows.
- The GPU server image built above, selected as the host image.
- GPU ticked, which adds --gpus all.
- /health should list ilgpu with a CUDA backend.
If the container fails with could not select device driver, Docker does not have the NVIDIA runtime yet. Install/repair Docker Desktop's GPU support or use a remote host. Inference is broader than training: it also covers LayerNorm and dense-GELU models.
Upload a model
- On the host card, Browse to a packaged .smm (or convert a GGUF first).
- Upload and use copies it to the host's Models folder and activates it.
- Chat with the model, or send an API request to /v1/chat/completions.
Training from scratch does not need a model on the host. A fine-tune uploads its base model with the job.
Use the API
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/v1/models \
-H "Authorization: Bearer <token>"
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"model":"default","messages":[{"role":"user","content":"Hello"}],"max_tokens":64}'
Streaming works with "stream": true. The host is OpenAI-compatible for chat; tool calling on the Compute API is still on the roadmap.
Problems
| Message | Fix |
|---|---|
| Docker Desktop is not running | Start Docker Desktop, then press Check again. |
| Port 8080 is already in use | Change the host port in Edit; Studio rewrites the Base URL. |
| GPU runtime is not available | Install the NVIDIA runtime for Docker, or untick GPU and use the CPU image. |
| Container exits immediately | Press Logs. Usually a missing token, a broken image build, or an image built for the wrong architecture. |
| Image not found | The image tag in the card does not match the built image. Rebuild or correct the tag. |