# How Do You Deploy Into a Customer VPC, On-Prem or Air-Gapped?

> How to run an AI system inside a customer's private cloud, on their own servers, or in a network with no internet, for your AI interview.

**In short:** You start by asking whether the customer's network can reach the internet and who holds the servers and keys. Then you package the model and code so they run with no outside calls, and bring updates in by a checked route.

AI and LLM interview question Q386, Forward Deployed Engineering and applied AI. Advanced, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/deploy-into-customer-vpc-on-prem-air-gapped

## Say it in 30 seconds

I'd start by asking whether the customer's network can reach the internet, and who owns the servers and keys. That picks the setup: a private link inside their cloud, my software on their servers, or an air-gapped site with no route out. For air-gapped sites, I fetch every file on a connected machine, carry it across on their approved route, and check each file's fingerprint before anything starts. Then I test with the network cut, because hidden downloads are what break.

## Say it in 2 minutes

When a customer's rules keep the data and the model inside their own network, I first ask two questions: can that network reach the internet, and who owns the servers and the keys? The answer picks one of three setups: a private link inside their cloud account, my software on their own servers, or an air-gapped site with no route out at all.

For an air-gapped site, the hard part is the transfer. I fetch everything on a connected machine: the model files, the container images, the config, and a hash list, which is one fingerprint per file. Any changed byte changes its fingerprint, so the mismatch shows up. The files go across on the customer's approved route, and the start script checks every hash before it runs anything.

Then I hunt for hidden calls. A library that downloads weights on first start, a licence check or a public font will fail or stall with no internet, and the demo on my laptop will still look fine. I test the build with the network cut before the customer ever sees it.

Updates follow the same route, so I plan them early and batch them. I tell the customer honestly what the setup cannot do, such as live features that need the vendor's cloud.

## What does deploying into a customer's network mean, in plain words?

Most AI products run on the company's own cloud. A customer with strict rules often says the data and the model must stay inside their network. A customer VPC is a private part of the customer's cloud account, with no public entry point. On-prem means servers the customer owns, in their own buildings. Air-gapped means a network with no route to the internet at all.

Think of a bank's fraud-review room. Its computers sit on their own network with no line out. A visiting engineer can carry a tool in on an approved drive, but the room cannot fetch anything from outside while they work. An AI system going into that room has to bring everything it needs with it.

A real case: a mid-size insurer wants a model that summarises customer claim files. Its security team says no file, log or prompt may leave the building. So the team must build something that runs there, starts without the internet, and gets updates through a controlled route.

- **VPC (virtual private cloud):** A private network inside a customer's cloud account, with no public entry point.
- **On-prem:** Short for on-premises: servers the customer owns and runs in its own buildings.
- **Air-gapped:** A network with no route to the internet or to other outside networks.
- **Model weights:** The learned numbers stored in a model's files. Copying the files copies the model.

## Which setup does the customer need?

Ask two questions first: can this network reach the internet, and who owns the servers and the keys? The answers pick the setup.

- **Customer VPC: Private link inside their cloud.** Your model runs inside their cloud account, or a managed service is reached through a private endpoint (for example AWS PrivateLink) with no public gateway.
- **On-prem: Your software on their servers.** You ship containers and a deployment recipe. They run it on their own machines and hold the keys.
- **Air-gapped: No link to the outside.** Everything is carried in on approved media. Nothing can call home, so every update is a planned transfer.

A cloud's private link works like this, as AWS describes its own service:

> "You can access Amazon Bedrock as if it were in your VPC, without the use of an internet gateway, NAT device, VPN connection, or Direct Connect connection." (AWS, Amazon Bedrock documentation)
>
> "Air-gap deployment lets you run a NIM without an internet connection, for example, with no connection to remote model registries such as NGC or Hugging Face Hub." (NVIDIA, NIM (its model server) documentation)

The customer's security team will also ask whether data can leave. Google's version of that control is a perimeter: a fence around chosen services. Inside it, data can move; a copy command aimed outside the fence is refused.

## How does an air-gapped deployment go, step by step?

The transfer is the hard part, so plan it before you write code. NVIDIA's guide for its own model servers splits the work into two phases: one on a connected machine, one on the isolated machine. The same shape works for any model.

*Diagram, Moving a model into an air-gapped site: Files are fetched on a connected machine, carried across on an approved drive, and checked before the model starts. After that step, nothing needs the internet.*
1. Model files are copied onto the approved transfer.
2. The hash list travels with them.
3. The files are carried across and checked again on arrival.
4. Every hash is checked first, and any mismatch stops the start.
5. The model starts, and users reach it on the local network only.

1. **Read the network rules first:** Ask what is blocked, which addresses are reachable, and who approves a transfer. Write it down before any build.
2. **Pack everything the model needs:** Model files, container images (packaged copies of the software), config, licence texts and a hash list. A hash is a fingerprint: change one byte and it no longer matches.
3. **Carry it across an approved route:** Use the customer's own transfer process. Don't invent a shortcut to save a day.
4. **Check before you start:** The start script compares every file with the hash list and refuses to run on any mismatch.
5. **Start with no outside access:** Run with no traffic going out to the internet and no API keys. NVIDIA's guide says to leave the keys out in that phase.
6. **Plan the next update:** Each new model or fix repeats the whole route, with a test on the isolated side. Updates are slow, so batch them.

## What quietly breaks when the internet is gone?

The usual failure is a call the team forgot. A model library tries to fetch files on first start. A licence check phones a server. A dashboard loads a font from a public network. The app works on a laptop and hangs at the customer's site.

Hugging Face, the model hub many teams use, documents its own offline mode, and says:

> "To use Transformers in an offline or firewalled environment requires the downloaded and cached files ahead of time." (Hugging Face, Transformers documentation)

So the files must be cached before the cut, and the library must be told to stay off the network. The same guide describes a switch that stops the library making web calls when it loads a model.

*Diagram, Where an offline start goes wrong: The same start works online and fails offline, because it still reaches for files on the internet. The fix is to ship the files and load them from local disk.*
1. With internet, the start pulls the files and works.
2. Without it, the same start has no route and fails.
3. The fix is to ship the files and load them from local disk.

> **Tip:** Test the build with the network cut before the customer does. Start everything once in a test machine with no route out, and read every error.

## How would this work for a claims assistant at a made-up insurer?

Harbor Mutual is a made-up insurer. It wants an assistant that summarises claim files for its adjusters. Its rules are strict: no file leaves the building, nothing calls the internet at runtime, and any update waits for a two-week security review.

The team serves an open model with vLLM, an open-source model server, on a few servers in its own data centre, each with graphics chips (GPUs) that run the model. The project's own page lists an OpenAI-compatible API server among its features, so the app keeps calling a local address that speaks the same API.

The hard part is the paperwork around the model: which files arrived, whether they match, and what happens when one does not. The sketch below does that check. It is a simplified start script, not the real one.

```python
# Files copied across the air gap, and the hash list signed off on the connected side.
import hashlib

def sha(data: bytes) -> str:
    return hashlib.sha256(data).hexdigest()[:12]  # shortcut: 12 hex characters for the demo, use the full SHA-256 in a real manifest

BUNDLE = {
    "model-00001.safetensors": b"stand-in-shard-bytes",
    "config.json": b'{"model_type": "demo", "rope_theta": 1000000}',
}
MANIFEST = {name: sha(data) for name, data in BUNDLE.items()}

def preflight(received: dict[str, bytes], manifest: dict[str, str]) -> str:
    for name, expected in manifest.items():
        if name not in received:
            return f"STOP: {name} is missing"
        if sha(received[name]) != expected:
            return f"STOP: {name} changed in transit"
    return "OK: all files match the manifest"

print(preflight(BUNDLE, MANIFEST))
tampered = dict(BUNDLE, **{"config.json": b'{"model_type": "demo", "rope_theta": 10000}'})
print(preflight(tampered, MANIFEST))
partial = {"config.json": BUNDLE["config.json"]}
print(preflight(partial, MANIFEST))
```

Output:

```text
OK: all files match the manifest
STOP: config.json changed in transit
STOP: model-00001.safetensors is missing
```

Run it on a laptop with the network off and you get the same answer every time. The lesson: a start script should stop when it is unsure.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain split: customer VPC, on-prem and air-gapped, and what each one allows.
- [ ] The two questions that pick the setup: can it reach the internet, and who holds the keys.
- [ ] Everything the model needs travels with the product, checked by hash.
- [ ] A hunt for hidden outside calls, and a test with the network cut.
- [ ] Updates follow the same route, so you plan them early.
- [ ] Honesty about what the setup cannot do, such as features that need the vendor's cloud.

**Common traps**

- Trap: "Just give them the API key and call our cloud." Better: An air-gapped site has no route out. The model and its runtime must live inside their walls.
- Trap: "It downloads the model on first start, so it's fine." Better: That fails with no internet. Ship the files, check them, and load them from local disk.
- Trap: "One build works everywhere." Better: The code can be the same, but each setup needs its own packing and transfer plan.

## Can you spot the outside call?

**Spot the outside call:** Your team is starting an air-gapped model server. Which startup line breaks the air-gap rule?

A. Load the weights from /mnt/bundle/model-00001.safetensors
B. Check every file against the hash list before serving
C. Pull the weights from the Hugging Face Hub on first start
D. Set HF_HUB_OFFLINE=1 so the library stays off the network

**Answer:** C. Pulling from the Hub reaches outside the building, and the site has no route to do it. The other three keep the start inside: local files, a hash check, and a switch that blocks web calls.

**Quick check:** An air-gapped customer needs a new model version. What is the right first step?

A. Let the cluster download the new weights on the next restart
B. Turn on vendor telemetry so their team can fetch it
C. Download and hash the new files on a connected machine, then carry them across the approved route
D. Open one firewall port to the model hub for an hour

**Answer:** C. An update follows the same route as the first install: fetch on a connected machine, hash, transfer, then check. Any open port or silent download breaks the rule the customer set.

## Can you answer these from memory?

**Flash cards**

- **What is a customer VPC?** A private network inside the customer's cloud account, with no public entry point.
- **What is air-gapped?** A network with no route to the internet or to other outside networks.
- **Why hash the files?** A hash is a fingerprint. Any changed byte stops the start.
- **What quietly breaks offline?** Any call the team forgot: a download on first start, a licence check, a public font.
- **What does HF_HUB_OFFLINE=1 do?** Stops the Hugging Face library making web calls to the Hub when it loads a model.
- **How do updates reach an air-gapped site?** The same route as the first install, with a test on the isolated side.

## Likely follow-up questions

- Q336 Hosted API vs self-hosted open weights for an enterprise? https://designervenkat.online/interview/ai/hosted-api-vs-self-hosted-open-weights
- Q388 How do you measure business impact and ROI? https://designervenkat.online/interview/ai/how-to-measure-ai-business-impact-and-roi
- Q385 How do you prototype in days? https://designervenkat.online/interview/ai/how-do-you-prototype-in-days
- Q201 What is prompt injection? https://designervenkat.online/interview/ai/what-is-prompt-injection
- Q202 Direct vs indirect prompt injection? https://designervenkat.online/interview/ai/direct-vs-indirect-prompt-injection
- Q391 After a month, how do you prove it's not just a demo? https://designervenkat.online/interview/ai/after-a-month-how-do-you-prove-it-s-not-just-a-demo

## Learn it in depth

- [Self-Hosted Models](https://designervenkat.online/learn/ai-engineering/self-hosted-models)
