Know your AI stack fits your GPUs before you start it.
Quickstart · Commands · Config · How it works · Contributing
mesh plans and starts a stack of local AI services (vLLM, speech-to-text, embeddings, TTS) on shared GPUs,
in the right order, with one log file per service.
$ mesh up models.yaml
[1/4] starting llm on port 8001 (log: logs/llm.log)
llm is up (memory it added: GPU 0: ~16260 MiB, GPU 1: ~16260 MiB)
[2/4] starting stt on port 8004 (log: logs/stt.log)
stt is up (memory it added: GPU 0: ~6436 MiB)
[3/4] starting tts on port 8005 (log: logs/tts.log)
tts is up (memory it added: GPU 1: ~2353 MiB)
[4/4] starting embed on port 8003 (log: logs/embed.log)
embed is up (memory it added: GPU 1: ~3059 MiB)
All services are up. Press Ctrl+C to stop everything.
Early release. Built and checked on one machine with two RTX 4090s. It reads
nvidia-smi, so it needs an NVIDIA GPU and a Unix-like system (tested on Linux). Reports from other GPUs are very welcome.
Why
If you run several vLLM or Docker services on one machine, you have probably hit this: the second service crashes at startup with "Free memory on device ... is less than desired GPU memory utilization". Each service measures free memory when it starts, and the first one already took its share. Working out fractions that fit, starting things in the right order, and finding which log holds the error is tedious to redo by hand.
Features
- Checks first. Simulates GPU memory for your services in start order and tells you which will not fit, with a suggested fraction.
- Starts in order. Each service waits for the previous one's health check, so they never race for memory.
- Any runtime. A service is a shell command: a venv, a conda environment or
docker run. - One log per service.
mesh logs llm -ffollows one;-n allprints the whole file. - Reports real memory. After each start it prints how much GPU memory that service added.
- Says who holds the memory.
mesh gpushows each GPU's memory and utilization and names the holder: one of your services, a Docker container, the desktop, or another program. It prints this automatically when a start fails for lack of memory. - Clean shutdown. One Ctrl+C (or
mesh down) stops everything in reverse order, tells you as each service stops, and ends with a completion message. - Readable in a terminal. Colour, tables, memory bars, and a live line while a model loads (a spinner and
the time so far). When output is piped or
NO_COLORis set, it prints plain text. - Helpful errors and Tab completion. A mistyped command, service name, config field or file gets a "did you
mean" hint, and
mesh completion bash|zsh|fishadds Tab completion, including your service names. - Just a YAML file. No daemon, no proxy, nothing listening on a port.
Install
Use a separate environment from the one that runs your models; mesh needs only pydantic, pyyaml and rich.
pipx install mesh-deck # or: pip install mesh-deck
To run the latest unreleased code instead:
pipx install git+https://github.com/mrahmedromman/mesh-deck.git
Quickstart
-
Write a
models.yaml(see examples/ for complete ones):services: - name: chat port: 8001 gpus: [0] gpu_memory_utilization: 0.55 overhead_mib: 1500 command: | source ~/venvs/vllm/bin/activate exec vllm serve /path/to/chat-model --port 8001 --gpu-memory-utilization 0.55 - name: embeddings port: 8003 gpus: [0] gpu_memory_utilization: 0.15 overhead_mib: 500 command: | source ~/venvs/vllm/bin/activate exec vllm serve /path/to/embedding-model --port 8003 --gpu-memory-utilization 0.15
-
Check that it fits, without starting anything:
mesh plan models.yaml
-
Start it:
mesh up models.yaml
-
In other terminals, from the same directory:
mesh status # what is running, and whether it answers mesh logs chat -f # follow one service's log mesh down # stop everything (Ctrl+C in the `mesh up` terminal does the same)
If the plan says a service will not fit, mesh up refuses to start unless you add --force. Output looks
like this (illustrative numbers):
2. embeddings FAIL
GPU 0: needs 3612 MiB free but only 2100 MiB is free
try --gpu-memory-utilization 0.08 or less
The first time, run mesh up once and copy the printed "memory it added" numbers into measured_mib. The
planner is most accurate with measured numbers. See Config.
Commands
| Command | What it does |
|---|---|
mesh plan CONFIG |
Simulates starting the services in order and reports which ones fit. |
mesh up CONFIG |
Plans, starts each service in order, waits for its health check, and reports the memory it added. |
mesh down |
Stops a stack started by mesh up. |
mesh status |
Shows each service's state, process id, port and health. |
mesh logs NAME [-n N|all] [-f] |
Shows or follows a service's log. |
mesh gpu |
Shows each GPU's memory and utilization, and who is holding the memory. |
mesh completion SHELL |
Prints a Tab-completion script for bash, zsh or fish. |
All options, mesh logs examples, exit codes and where files go: docs/commands.md.
How it works
The driver keeps back some GPU memory, and vLLM measures free memory when each service starts. mesh subtracts
the reserved memory and anything other programs are using, then checks each service in order, reducing what is
free as services start. On two RTX 4090s the planned free memory matched the real nvidia-smi numbers to within
about 20 MiB once real footprints were entered. Details and limits: docs/how-it-works.md.
Compared with
- Docker Compose can order containers with
depends_onand healthchecks. It is the right tool if everything is a container.meshalso handles plain commands (a venv or conda environment) and checks GPU memory before starting. - llama-swap swaps models on demand behind one endpoint.
meshdoes not proxy requests or swap: it starts a fixed set of services that stay loaded. - A shell script works fine for one machine.
meshreplaces the parts that are tedious to redo: working out the fractions, waiting on health checks, separate logs, and a clean shutdown.
Security
command and stop run through bash with your user's permissions, so a models.yaml is a script. Only run
configs you trust. mesh itself sends nothing anywhere: it runs nvidia-smi, starts your commands, and checks
127.0.0.1 ports.
Limitations
- NVIDIA GPUs and Unix-like systems only. Not tested on Windows, AMD or Intel GPUs.
- No request proxy or single endpoint; each service keeps its own port.
- It does not restart a service that crashes after startup; it prints a warning.
mesh gpuneeds Linux and reports a snapshot only: no live view, no per-process utilization, no killing of processes. It recognises Docker containers but not Podman or Kubernetes.- Estimates for services nobody has measured are rough.
- Logs are overwritten on each
mesh up, with no rotation.
Contributing
Tests need no GPU: pip install -e ".[dev]" then pytest. The most useful contribution is real nvidia-smi
output from a GPU other than an RTX 4090, added as a test fixture. Bug reports and ideas are welcome as issues.
See CONTRIBUTING.md for the exact commands, what to include in a bug report, and what is in
scope.
License
Metadata
Release files for mesh-deck 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mesh_deck-0.1.0.tar.gz | 58.7 kB | With provenance | Details for mesh_deck-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mesh_deck-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mesh_deck-0.1.0-py3-none-any.whl |
Total release size: 90.1 kB
Release files / mesh_deck-0.1.0.tar.gz
| Download URL | mesh_deck-0.1.0.tar.gz |
|---|---|
| Size | 58.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
909771b3d2afd08f377b8c480eab4e583f9563b71e50111863ec043d3326cc44
|
|
BLAKE2b-256 checksum How to use checksums |
cc7e344e08da211ced66534754acac2864cb2272288903903f24e834cbd1d616
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / mesh_deck-0.1.0-py3-none-any.whl
| Download URL | mesh_deck-0.1.0-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dca6495a861e6c68661d43e39437335e03104958b517de20f663c3225ebd2a7
|
|
BLAKE2b-256 checksum How to use checksums |
a20de62f2a31d749b0894da176cbfae7ece5f81b9ce81808631d0c06001d66f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for mesh-deck 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mesh_deck-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.