# Finding Hidden Online Dependencies in AI Software

> The usual culprits are model and tokenizer downloads from the Hugging Face Hub, telemetry, update checks and packages installed by pip at runtime. Switch them off with offline variables such as HF_HUB_OFFLINE, per-library opt-outs, and prove it with a test run that has no network.

Canonical URL: https://www.ruebstudio.de/en/guides/local-ai/ai-software-offline-dependencies  
Author: Dr.-Ing. Marcus Rüb, CEO  
Published: 2026-11-07

Getting a local language model to answer is the easy part. Proving that the whole stack has stopped reaching out to the internet is harder: libraries fetch tokenizers on first use, report usage statistics, check for updates and sometimes install packages while running. This checklist lists the usual suspects, the switch for each, and a test that shows whether you caught them all. Documentation checked in November 2026.

## Who is this checklist for?

It is written for engineers and operators running an AI stack on an isolated or tightly filtered network. It complements the overview of [air-gapped AI in fully isolated networks](https://www.ruebstudio.de/en/guides/local-ai/air-gapped-ai-llm) by focusing on one question: what does the software itself try to fetch once it is running?

How it differs from the companion tutorial: [moving models into an air-gapped network](https://www.ruebstudio.de/en/guides/local-ai/transfer-models-air-gapped) covers the one-off transfer of model weights. This page covers everything that still attempts a connection afterwards. Keeping the two apart speeds up troubleshooting: a missing model is a transfer problem, a connection attempt at startup is a configuration problem.

## Group 1: models and tokenizers fetched at runtime

The Hugging Face Hub is the most common hidden dependency. Even with every file cached, the client asks the Hub whether a newer version exists unless you tell it not to. Setting `HF_HUB_OFFLINE=1` removes that call, so a missing file raises an error instead of triggering a download.

- **Set `HF_HUB_OFFLINE=1`.** The [huggingface_hub documentation](https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables) notes that `hf_hub_download` still makes an HTTP request to check for a newer version even when the file is cached. The variables are read at import time, so set them before the Python process starts.
- **Pin revisions to commit hashes.** According to the [Transformers documentation](https://huggingface.co/docs/transformers/installation), loading by branch or tag contacts the Hub once to resolve the commit; a commit hash goes straight to the cache. In code, `local_files_only=True` on `from_pretrained()` does the same job.
- **Fix the cache location.** Point `HF_HOME` or `HF_HUB_CACHE` at a directory that belongs to the image or a mounted volume, not at a user's home directory.
- **Ship tiktoken encodings with the stack.** Encodings such as `cl100k_base` and `o200k_base` are fetched from `openaipublic.blob.core.windows.net`, as the [tiktoken source](https://github.com/openai/tiktoken/blob/main/tiktoken_ext/openai_public.py) shows. Without `TIKTOKEN_CACHE_DIR`, [load.py](https://github.com/openai/tiktoken/blob/main/tiktoken/load.py) caches them under `data-gym-cache` in the system temp directory. Set `TIKTOKEN_CACHE_DIR` to a persistent path and fill it before transfer.
- **Remember embedding, reranking and speech models.** The [Open WebUI offline guide](https://docs.openwebui.com/tutorials/maintenance/offline-mode) warns that a fresh install may start and then fail on the first document upload if the embedding model is missing.

## Group 2: disable telemetry in AI tools

Several popular components send usage data by default. On an isolated network this is more than a privacy issue: blocked connections cause timeouts and log noise that hide real faults. Opt out per component rather than trusting a single global switch.

- **Hugging Face:** `HF_HUB_DISABLE_TELEMETRY=1`. The [documentation](https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables) treats `DO_NOT_TRACK=1` as equivalent across the Hugging Face Python ecosystem, including `transformers`, `diffusers` and `gradio`.
- **vLLM:** collects anonymous usage data by default, per the [vLLM documentation](https://docs.vllm.ai/en/latest/usage/usage_stats.html). Opt out with `VLLM_NO_USAGE_STATS=1`, `DO_NOT_TRACK=1` or the file `~/.config/vllm/do_not_track`.
- **Chroma:** [config.py](https://github.com/chroma-core/chroma/blob/main/chromadb/config.py) sets `anonymized_telemetry` to `True` by default, backed by PostHog. Use `ANONYMIZED_TELEMETRY=False`, as Chroma does in its own [test compose files](https://github.com/chroma-core/chroma/blob/main/docker-compose.test.yml), or `Settings(anonymized_telemetry=False)` in the client.
- **Gradio:** the [Gradio documentation](https://www.gradio.app/guides/environment-variables) lists `GRADIO_ANALYTICS_ENABLED` with a default of `"True"`; set it to `"False"`.
- **Streamlit:** `gatherUsageStats` in the `[browser]` section of [config.toml](https://docs.streamlit.io/develop/api-reference/configuration/config.toml) defaults to `true`.

```bash
# Example environment for an offline service
export HF_HUB_OFFLINE=1
export HF_HUB_DISABLE_TELEMETRY=1
export DO_NOT_TRACK=1
export VLLM_NO_USAGE_STATS=1
export ANONYMIZED_TELEMETRY=False
export GRADIO_ANALYTICS_ENABLED=False
export TIKTOKEN_CACHE_DIR=/opt/ai/tiktoken-cache
```

## Group 3: update and version checks

Update checks are well meant, but each one is another outbound call at startup. On an isolated network they slow the start or fill the logs with warnings. Switch them off explicitly instead of waiting for a network timeout every time.

- **The `hf` CLI** checks PyPI for a newer release at most once every 24 hours, according to the [documentation](https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables). `HF_HUB_DISABLE_UPDATE_CHECK=1` turns it off.
- **Open WebUI:** the [offline guide](https://docs.openwebui.com/tutorials/maintenance/offline-mode) says `OFFLINE_MODE=true` sets `HF_HUB_OFFLINE=1`, disables the version check and forces the model auto-update flags off. It also states plainly that these variables do not block outbound connections.
- **Speech-to-text in Open WebUI:** per the same guide, `WHISPER_MODEL_AUTO_UPDATE=false` alone does not stop a download if the model is missing; only `HF_HUB_OFFLINE=1` blocks the attempt.
- **Your own containers and scripts:** search entrypoints for `apt-get update`, `git pull` or `curl`. Those lines belong in the build, not the start.

## Group 4: package installs at startup

Some applications install Python packages only when an extension is loaded. Without a network the load fails; with one, the software changes in production without review. Neither is acceptable on an isolated network, so move every install into the image build.

- **Open WebUI tools and functions:** requirements declared in an extension's frontmatter are installed with `pip install` in a subprocess, as [plugin.py](https://github.com/open-webui/open-webui/blob/main/backend/open_webui/utils/plugin.py) shows. `ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS` defaults to `True` in [env.py](https://github.com/open-webui/open-webui/blob/main/backend/open_webui/env.py), and offline mode skips the install. The packages must therefore already be in the image.
- **Point pip at a local wheel directory.** With `--no-index` and `--find-links`, pip reads only from the given location, and `--require-hashes` checks every requirement against a hash, according to the [pip documentation](https://pip.pypa.io/en/stable/cli/pip_install/).
- **Remote model code.** `trust_remote_code=True` loads modelling code that does not come from Transformers. The [Transformers documentation](https://huggingface.co/docs/transformers/main/en/models) recommends pinning a specific revision. On an air-gapped network that code travels with the model and needs the same review.
- **Lazily fetched language data.** NLTK packages can be unpacked by hand into an `nltk_data` folder with `NLTK_DATA` pointing at it, as the [NLTK documentation](https://www.nltk.org/data.html) describes. Check whether your document pipeline calls `nltk.download()`.

```bash
# Install from a local wheel directory and enforce hashes
pip install --no-index --find-links /opt/ai/wheels --require-hashes -r requirements.txt
```

## Group 5: licence checks and activation

Commercial components such as driver bundles, developer tools or databases may need online activation or a licence server. Settle this before purchase, because a failed activation can surface days after go-live rather than on the first start.

- **Read the activation model** in the licence terms or vendor documentation: online, offline via a file, or through a local licence server.
- **Record expiry dates.** If an offline licence file expires, a calendar reminder prevents an outage.
- **Place the licence server inside the isolated network** where the vendor supports it, rather than opening a firewall exception.

## How do you prove the stack runs offline?

The reliable test is a run with no network at all in which every feature is triggered once. A clean startup proves little, because many downloads happen on the first upload, the first search or the first voice input.

- **Start containers without a network.** With `--network none`, a container gets only the loopback interface, according to the [Docker documentation](https://docs.docker.com/engine/network/drivers/none/).
- **Work through a feature list:** chat, document upload, search, reranking, voice input, every installed extension.
- **Search the logs** for timeouts, DNS errors and messages mentioning offline mode.
- **Log outbound attempts at the firewall**, even blocked ones. Every entry points to a dependency you have missed.

## Common gaps

Most problems do not appear on day one. They show up after a restart, a new extension or an upgrade. Watch for these four patterns in particular.

- **A cache in the temp directory** that disappears on reboot, such as the tiktoken cache without `TIKTOKEN_CACHE_DIR`.
- **Variables set only in a shell**, not in the service, container or systemd unit.
- **A new extension or model** added without repeating the offline test.
- **Offline flags mistaken for a network block:** they change how programs behave; they do not replace firewall rules.

## Next step

Keep the environment variables in the service configuration, version them with the image and repeat the no-network test after every change. For how such an operation fits together end to end, see the page on [sovereign AI](https://www.ruebstudio.de/en/sovereign-ai).

## Frequently asked questions

### Does DO_NOT_TRACK=1 disable telemetry everywhere?

No. It only works in software that reads it, such as the Hugging Face Python libraries and vLLM according to their documentation. Every other component needs its own opt-out.

### Is blocking traffic at the firewall enough on its own?

It stops data leaving, but the software still tries. You get timeouts, retries and noisy logs, and features fail at first use. Combine the network block with the offline settings in this checklist.

### Why does the app start fine in testing but fail later?

Many downloads are lazy and only happen when a feature is first used, such as the first document upload or the first voice input. Test every feature once without a network, not just the startup.

### Where should the environment variables live?

In the service definition that actually starts the process, such as the container image, the compose file or the systemd unit. Variables set in an interactive shell are lost on the next restart.

## Sources

- [huggingface_hub: Environment variables](https://huggingface.co/docs/huggingface_hub/package_reference/environment_variables)
- [Transformers: Installation, cache and offline mode](https://huggingface.co/docs/transformers/installation)
- [Transformers: Loading models (custom models, trust_remote_code)](https://huggingface.co/docs/transformers/main/en/models)
- [vLLM: Usage Stats Collection](https://docs.vllm.ai/en/latest/usage/usage_stats.html)
- [tiktoken: load.py (BPE file cache and download)](https://github.com/openai/tiktoken/blob/main/tiktoken/load.py)
- [tiktoken: openai_public.py (encoding download URLs)](https://github.com/openai/tiktoken/blob/main/tiktoken_ext/openai_public.py)
- [Chroma: config.py (anonymized_telemetry)](https://github.com/chroma-core/chroma/blob/main/chromadb/config.py)
- [Chroma: docker-compose.test.yml (ANONYMIZED_TELEMETRY=False)](https://github.com/chroma-core/chroma/blob/main/docker-compose.test.yml)
- [Open WebUI: Running in offline mode](https://docs.openwebui.com/tutorials/maintenance/offline-mode)
- [Open WebUI: env.py (ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS, OFFLINE_MODE)](https://github.com/open-webui/open-webui/blob/main/backend/open_webui/env.py)
- [Open WebUI: plugin.py (pip install of tool requirements)](https://github.com/open-webui/open-webui/blob/main/backend/open_webui/utils/plugin.py)
- [Gradio: Environment Variables](https://www.gradio.app/guides/environment-variables)
- [Streamlit: config.toml](https://docs.streamlit.io/develop/api-reference/configuration/config.toml)
- [pip install: --no-index, --find-links, --require-hashes](https://pip.pypa.io/en/stable/cli/pip_install/)
- [NLTK: Installing NLTK Data](https://www.nltk.org/data.html)
- [Docker: None network driver](https://docs.docker.com/engine/network/drivers/none/)
