magnitudedev/magnitude, runs Magnitude as a server: the OpenAI and Anthropic compatible API at :10100/inference/v1 and :10100/inference/anthropic, the browser app at :10100, and the magnitude CLI through docker exec. It is the same product as a remote server, packaged for people who run everything in containers.
The image runs on x64 and ARM64; Docker picks the right one. One image serves CPU, NVIDIA CUDA, and Vulkan GPUs.
Run it
1
Start the container
Pick the tab for your computer and run its one command.The container reports
- Linux with NVIDIA
- Linux with AMD or Intel
- Linux without a GPU
- macOS
- Windows
Install the NVIDIA driver and the NVIDIA Container Toolkit on the host first. Then run:CUDA needs an Ampere or newer GPU. The image asks the toolkit for its Vulkan driver too, so older cards such as Turing run on Vulkan instead.
healthy in docker ps once Magnitude is ready. Check which GPU it found with docker exec magnitude magnitude hardware.Keep -v magnitude:/data in every command. The volume holds models, settings, the network key and the installation’s identity; without it, all of them are lost when the container is removed.2
Copy the network key
On its first start Magnitude makes a network key, the API key for everything outside the container, and prints it:
3
Download a model
4
Use it
Open
http://localhost:10100 in a browser and sign in with the key, or point any OpenAI-compatible client at http://localhost:10100/inference/v1 with the key as the API key. From another computer, use the Docker host’s address instead of localhost.docker rm -f magnitude and run the command again; the volume keeps everything.
Docker Compose
compose.yaml
MAGNITUDE_NETWORK_KEY= and a long random value in a .env file beside it, then run docker compose up -d. Run CLI commands with docker compose exec magnitude magnitude ….
For AMD and Intel GPUs, replace the deploy block with devices: ["/dev/dri:/dev/dri"] and group_add: ["GID"], where GID is the number that stat -c %g /dev/dri/renderD128 prints. For CPU, remove the deploy block.
The network key
In a container, network access is on by default: Magnitude listens on all of the container’s interfaces and requires a key from every caller outside the container. Requests through a published port count as coming from another device.- Let Magnitude make one: as in Run it, the first start generates a key, saves it in the volume, and prints it once in
docker logs magnitude. Recreating the container on the same volume keeps it. Read it again with:
network.apiKey there.
- Or set your own: pass
-e MAGNITUDE_NETWORK_KEY=KEY, as the Compose and Kubernetes examples do. It must be 16 to 512 printable characters without spaces; use a long random value, such as the output ofopenssl rand -hex 32. Magnitude uses it at every start the variable is set, in place of the saved key, so pass it every time you recreate the container.
Authorization: Bearer KEY or x-api-key: KEY. Check it from the host:
localhost or a Tailscale name. To open it by another host name, such as http://nas.local:10100, add the names to your docker run command, separated by commas:
http://magnitude:10100 without this.
Memory limits
With a memory limit, such as-m 8g or a Kubernetes resources.limits.memory, Magnitude counts the limit as the container’s memory and fits models to it. It keeps 2 GB or a tenth of the limit in reserve, whichever is larger, so even the smallest catalog models need a limit of about 5 GB. docker exec magnitude magnitude hardware shows the memory Magnitude sees.
Data and permissions
Magnitude runs as uid 1000 with its home at/data. Everything it keeps is in /data/.magnitude: models in models/, settings in config.json, logs in logs/.
A named volume, as in the examples, is created with the right owner. To use a host directory instead, make it writable by uid 1000 first:
-v /srv/magnitude:/data in place of -v magnitude:/data in your docker run command.
Give each container its own volume. A second container started on a volume that another one is using stops at once and says so. On network filesystems that can’t lock files, such as some NFS shares and ReadWriteMany volumes, nothing stops it, so make sure only one container uses each volume.
Ubuntu’s snap of Docker can only mount folders under your home directory; use a named volume, a folder in your home directory, or Docker from docker.com.
Use models you already have
Mount existing model folders read-only. Magnitude finds Ollama models and the Hugging Face cache automatically when the container’s environment points at them. Add these flags to yourdocker run command:
/usr/share/ollama/.ollama/models is where the Ollama Linux service keeps models; a user’s own Ollama uses ~/.ollama/models. For any other folder of GGUF files, mount it, for example by adding -v /srv/gguf:/models/gguf:ro to the docker run command, and add it:
/data/.magnitude, with -v ~/.magnitude:/data/.magnitude in place of -v magnitude:/data, and add --user "$(id -u):$(id -g)" if your user isn’t uid 1000. Quit the installed app and stop its service first, and don’t run both at once: nothing stops them from using the directory together. The container’s network access applies only while the container runs; the directory’s own network settings stay as they were, and the container saves its key there as network.apiKey.
Hugging Face sign-in
For gated models, private repositories or higher download limits, sign in with a code you enter on any device:/data and survives upgrades. Magnitude doesn’t read HF_TOKEN.
Use it from other containers
Put your app and Magnitude on the same Docker network, such as one Compose project, and use the service name:
Requests that carry the key are accepted under any host name, so the service name works as it is.
Kubernetes
One replica with a persistent volume, the key from a Secret, and one NVIDIA GPU. It assumes the NVIDIA device plugin; for CPU, remove thenvidia.com/gpu limit.
magnitude.yaml
VERSION with a release, such as 0.2.14, so the cluster upgrades only when you change it. Recreate stops the old pod before the new one starts, since only one may use the volume. On clusters that select the NVIDIA runtime by class, such as k3s, add runtimeClassName: nvidia to the pod spec. Other pods reach it at http://magnitude:10100/inference/v1 with the key; run CLI commands with kubectl exec deploy/magnitude -- magnitude ….
Podman
Rootless Podman 4.3 or later maps your account to uid 1000 in the container with--userns=keep-id. NVIDIA GPUs use CDI after sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml:
:Z relabels the directory for SELinux, as on Fedora and RHEL. Leave out --device nvidia.com/gpu=all for CPU, or use --device /dev/dri --group-add keep-groups for Vulkan. Run CLI commands with podman exec magnitude magnitude ….
Logs and status
/data/.magnitude/logs/inference.log.
Upgrade
The container never updates itself: an update installed inside it would be lost when the container is recreated. It checks for new releases and says when one is available, in the logs, inmagnitude status and in Settings. To upgrade, pull the image and recreate the container on the same volume:
latest is the newest stable release, beta and alpha the newest prereleases, and each release also has its own tag, such as magnitudedev/magnitude:0.2.14, for pinning. A container on a prerelease is offered that channel’s releases and told to pull magnitudedev/magnitude:beta or :alpha; a pinned container upgrades when you change its tag.
Port 10100 is already in use
If Magnitude also runs on the host, it already uses port 10100. Publish the container on another host port by using-p 10101:10100 in place of -p 10100:10100 in your docker run command, and use that port in URLs. The API is then at http://localhost:10101/inference/v1.