← All guides AI Release
RU Subscribe to @ai_releaseorg

How to deploy NVIDIA DGX Spark in a company: setup, local models and cost

Updated: 04.12.2026 · AI Release · @ai_releaseorg
How to deploy NVIDIA DGX Spark in a company: setup, local models and cost

🤖 AI summary

Which topics does it cover?
nvidia dgx spark настройка, dgx spark внедрение, локальные ии для бизнеса, dgx spark стоимость, запуск llm на dgx spark →

TL;DR

What you will get

Most write-ups stop at "it runs". The deliverable that decides whether the unit stays in the office is the third bullet: a measured cost-per-token number from your own hardware, not a vendor slide.

Quick start

nvidia-smi
docker run --rm --gpus all nvcr.io/nvidia/cuda:<cuda-tag> nvidia-smi
export NGC_API_KEY=<your-ngc-key>
echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin
docker run --rm --gpus all -p 8000:8000 -v ~/.cache/nim:/opt/nim/.cache -e NGC_API_KEY <inference-image>:<tag>
curl -s http://localhost:8000/v1/models | jq

Details and verification are in the steps below.

Requirements and setup

Illustration: Requirements and setup
Illustration: Requirements and setup

Checklist before you start:

Step 1. Capture a verified baseline of the device

What to do: create a dated inventory of OS, kernel, driver, GPU, memory and disk before you install or pull anything.

mkdir -p ~/dgx-baseline && cd ~/dgx-baseline
{ uname -a; cat /etc/os-release; nvidia-smi; df -h; free -h; } | tee baseline-$(date +%F).log
nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv | tee gpu.csv

Why: DGX Spark uses a unified memory pool shared between CPU and GPU, so "how much VRAM do I have" is not a fixed number — the OS and your containers draw from the same pool. You need the free figure at idle as your budget for model weights plus KV cache, and you need the driver and CUDA versions to pick a matching container tag.

How to check: nvidia-smi prints a table with a GPU name row and a CUDA Version in the header; gpu.csv shows the same values as CSV. Confirm free -h and nvidia-smi report a comparable total. If the numbers disagree wildly, stop and check the documentation for how unified memory is reported on your image.

Example: the log line baseline-2025-06-14.log opens with the kernel string, then the nvidia-smi table, then a Mem: row from free -h. Keep this file; every later measurement is compared against it.

Also record the container runtime state:

docker info --format '{{json .Runtimes}}' | jq

Expected: a JSON object containing "nvidia". If it is absent, install the NVIDIA Container Toolkit before continuing.

Step 2. Serve a local model behind an OpenAI-compatible API

Illustration: Step 2. Serve a local model behind an OpenAI-compatible API
Illustration: Step 2. Serve a local model behind an OpenAI-compatible API

What to do: authenticate to NGC, start a serving container on port 8000, and expose it on the LAN behind a reverse proxy with an API key.

export NGC_API_KEY=<your-ngc-key>
echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin

docker run -d --name local-llm --restart unless-stopped --gpus all \
  -p 8000:8000 \
  -v ~/.cache/model-cache:/opt/nim/.cache \
  -e NGC_API_KEY \
  <inference-image>:<tag>

docker logs -f local-llm

Why: an OpenAI-compatible /v1/chat/completions surface means every downstream tool changes one setting instead of its code. That is exactly how you wire automation platforms to a local model — see how to connect n8n to a local LLM for the client side of that swap. The same applies to CLI coding agents reconfigured to point at a different base URL.

How to check:

curl -s http://localhost:8000/v1/models | jq -r '.data[].id'

curl -s http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"<model-id>","messages":[{"role":"user","content":"Reply with the single word: ready"}],"max_tokens":16}' \
  | jq -r '.choices[0].message.content'

Expected: the model id from the first command, and ready from the second. A JSON body with "object": "list" and an empty data array means the container is up but no model is loaded — read docker logs local-llm.

Memory budgeting matters here: a model whose weights nearly fill the pool will serve short prompts and then fail on long contexts because the KV cache cannot grow. Watch nvidia-smi during the first long request:

watch -n 1 'nvidia-smi --query-gpu=memory.used,memory.total --format=csv'

If the used figure climbs to the total, drop to a smaller quantization or reduce the served context length. Consult the model card and the container documentation for the exact flags.

Step 3. Measure throughput and build the cost model

Illustration: Step 3. Measure throughput and build the cost model
Illustration: Step 3. Measure throughput and build the cost model

What to do: run a fixed workload three times, record tokens/second, then feed the numbers into the worksheet.

import json, time, urllib.request

URL = "http://localhost:8000/v1/chat/completions"
payload = {"model": "<model-id>",
           "messages": [{"role": "user", "content": "Explain TCP retransmission in 200 words."}],
           "max_tokens": 256}

for i in range(3):
    t0 = time.time()
    req = urllib.request.Request(URL, data=json.dumps(payload).encode(),
                                 headers={"Content-Type": "application/json"})
    body = json.load(urllib.request.urlopen(req))
    elapsed = time.time() - t0
    out = body["usage"]["completion_tokens"]
    print(f"run {i+1}: {out} tokens in {elapsed:.2f}s -> {out/elapsed:.1f} tok/s")

Why: the usage.completion_tokens field is the only trustworthy token count — character counts overflow context windows and distort every downstream number. Three runs expose a cold-start outlier.

How to check: the three lines should be within roughly 10% of each other; if run 1 is far slower, it was the model load and you should rerun.

Cost lineFormulaYour inputs
Device capexprice on your quote, incl. tax and shipping<capex>
Amortized per monthcapex ÷ useful life in months<capex> ÷ <months>
Power per monthwatts ÷ 1000 × hours × $/kWh<watts> × 730 × <tariff>
Tokens per monthtok/s × 2,592,000 × utilization<tok/s> × 2,592,000 × <0–1>
Cost per 1M tokensmonthly cost ÷ (tokens ÷ 1,000,000)computed
Break-even vs APImonthly cost ÷ API price per tokencomputed

Example (assumed inputs, replace with your own): 800 tok/s aggregate at 25% utilization gives 800 × 2,592,000 × 0.25 = 518.4M tokens/month. With $150 amortization + $35 power + $50 operations = $235/month, the cost is 235 ÷ 518.4 = $0.45 per 1M tokens. If your API quote is $2.00 per 1M output tokens, local break-even is 235 ÷ 0.000002 ≈ 117.5M tokens/month.

Where this does not work: workloads that are bursty and low-volume. At 5% utilization the same device produces ~130M tokens/month and the per-token cost roughly quadruples — for that profile a hosted API is usually cheaper. If you need a hybrid, the OpenAI models via Google Cloud setup is a practical way to keep a cloud path for overflow while the Spark handles steady-state traffic.

Troubleshooting

Problem. The GPU is invisible to containers

sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
docker run --rm --gpus all nvcr.io/nvidia/cuda:<cuda-tag> nvidia-smi

Problem. Image pull from NGC is rejected

echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin
docker pull <inference-image>:<tag>

Problem. The model dies on long prompts

docker restart local-llm
watch -n 1 'nvidia-smi --query-gpu=memory.used,memory.total --format=csv'

Summary and next steps

You now have a baselined DGX Spark, a local OpenAI-compatible endpoint on port 8000, and a cost-per-token figure derived from your own measurements. Next, point one internal tool at the endpoint, re-run the Step 3 benchmark after any driver or container update, and keep the baseline log for comparison.

FAQ

Does DGX Spark replace a data-center GPU server?

It is a compact office unit, not a rack server. Use it for team-scale inference, prototyping and private data that must not leave the building; keep data-center hardware for multi-tenant, high-concurrency serving. Confirm the supported concurrency for your model against the documentation.

Can I serve several models at once on one unit?

Yes in principle, but every loaded model reserves its weights in the same unified memory pool. Measure free memory at idle in Step 1, subtract the OS overhead, and divide what remains across models. Most teams start with one model and add a second only after the Step 3 numbers are stable.

How do I let the whole team use the endpoint safely?

Keep the container on localhost, put a reverse proxy in front of it with TLS and a per-user API key, and expose only the proxy port. Never publish port 8000 directly to the office network — the container has no authentication by default.

What if our usage is too bursty for local serving?

Run the Step 3 worksheet at your realistic utilization figure. Below roughly 10% utilization the amortized hardware cost dominates; in that case keep the Spark for sensitive or latency-critical requests and route the rest to a hosted API.

🤖 AI summary

AI Release Knowledge Layer
Machine-readable description · Version 1.0

Status: practical guide. Some statements come from vendors; verify in your environment.

1. Summary

Time to complete: ~120 minutes from first boot to a model answering requests, plus 1–2 days to collect the numbers your finance team will ask for. Difficulty level: Intermediate

Inside: direct answers, key facts, entities, context, reliability, unknowns and sources.

Machine data: Citation Map JSON · JSON-LD · Semantic Embeddings — separate stage.

Full Knowledge Layer: sections 2–8

2. Direct answers

What is required?
DGX Spark unit, power supply and network cable; record the serial number — you will need it for support cases.; The DGX OS image the unit shipped with. Do not re-image before capturing the baseline in Step 1.; sudo rights on the device.; NVIDIA NGC account: the container registry nvcr.io requires an API key, and the… → details (AR-GUIDE-KAKVNEDRIT-003)
How to do it?
Step 1. Capture a verified baseline of the device → Step 2. Serve a local model behind an OpenAI-compatible API → Step 3. Measure throughput and build the cost model → details (AR-GUIDE-KAKVNEDRIT-004)
Which topics does it cover?
nvidia dgx spark настройка, dgx spark внедрение, локальные ии для бизнеса, dgx spark стоимость, запуск llm на dgx spark → details (AR-GUIDE-KAKVNEDRIT-002)
What are the key points?
Time to complete: ~120 minutes from first boot to a model answering requests, plus 1–2 days to collect the numbers your finance team will ask for. Difficulty level: Intermediate → details (AR-GUIDE-KAKVNEDRIT-007)

3. Key facts

  1. Time to complete: ~120 minutes from first boot to a model answering requests, plus 1–2 days to collect the numbers your finance team will ask for. — evidence; status: заявление источника.
  2. Difficulty level: Intermediate — evidence; status: заявление источника.
  3. You will need: one DGX Spark unit with its factory DGX OS image, an admin account with sudo, an NVIDIA NGC account and API key, Docker with the NVIDIA Container Toolkit, curl and jq, a Python 3 virtualenv for the benchmark script, and a spreadsheet. — evidence; status: заявление источника.
  4. DGX Spark unit, power supply and network cable; record the serial number — you will need it for support cases. — evidence; status: заявление источника.
  5. The DGX OS image the unit shipped with. Do not re-image before capturing the baseline in Step 1. — evidence; status: заявление источника.
  6. sudo rights on the device. — evidence; status: заявление источника.

4. Entities

EntityTypeRole
nvidia dgx spark настройкатема/инструментупоминается в заголовке, TL;DR или разделах гайда
dgx spark внедрениетема/инструментупоминается в заголовке, TL;DR или разделах гайда
локальные ии для бизнесатема/инструментупоминается в заголовке, TL;DR или разделах гайда
dgx spark стоимостьтема/инструментупоминается в заголовке, TL;DR или разделах гайда
запуск llm на dgx sparkтема/инструментупоминается в заголовке, TL;DR или разделах гайда
Dockerплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
CUDAплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
Pythonплатформа/технологияупоминается в заголовке, TL;DR или разделах гайда
OpenAIкомпанияупоминается в заголовке, TL;DR или разделах гайда
NVIDIAкомпанияупоминается в заголовке, TL;DR или разделах гайда

5. Context

  • Guide — describes → How to deploy NVIDIA DGX Spark in a company: setup, local models and cost (AR-GUIDE-KAKVNEDRIT-001).
  • Guide — includes step → Step 1. Capture a verified baseline of the device (AR-GUIDE-KAKVNEDRIT-001).

6. Reliability

Confirmed

No independent confirmation is provided; source claims and editorial conclusions are separated below.

Source claims

  • Product features, versions, prices and limits come from vendors and the guide.
  • Commands and steps are recommendations, not guaranteed results.

AI Release analysis

  • Structure, comparison and selection criteria are editorial.
  • The guide does not replace an independent audit or legal advice.

7. Unknowns

  • Current versions, prices and limits.
  • Independent benchmarks and quality checks.
  • Terms of use and data policy.

8. Sources

SourceTypeRole
No external links——

Cite as: AI Release. Как внедрить NVIDIA DGX Spark в компании: настройка, локальные модели и расчёт стоимости. ai-release.org.