Skip to content

Finding Hidden Online Dependencies in AI Software

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 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 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 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, 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 shows. Without TIKTOKEN_CACHE_DIR, 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 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 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. Opt out with VLLM_NO_USAGE_STATS=1, DO_NOT_TRACK=1 or the file ~/.config/vllm/do_not_track.
  • Chroma: 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, or Settings(anonymized_telemetry=False) in the client.
  • Gradio: the Gradio documentation lists GRADIO_ANALYTICS_ENABLED with a default of "True"; set it to "False".
  • Streamlit: gatherUsageStats in the [browser] section of config.toml defaults to true.
# 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. HF_HUB_DISABLE_UPDATE_CHECK=1 turns it off.
  • Open WebUI: the offline guide 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 shows. ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS defaults to True in 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.
  • Remote model code. trust_remote_code=True loads modelling code that does not come from Transformers. The Transformers documentation 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 describes. Check whether your document pipeline calls nltk.download().
# 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.
  • 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.

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

  1. huggingface_hub: Environment variables huggingface.co
  2. Transformers: Installation, cache and offline mode huggingface.co
  3. Transformers: Loading models (custom models, trust_remote_code) huggingface.co
  4. vLLM: Usage Stats Collection docs.vllm.ai
  5. tiktoken: load.py (BPE file cache and download) github.com
  6. tiktoken: openai_public.py (encoding download URLs) github.com
  7. Chroma: config.py (anonymized_telemetry) github.com
  8. Chroma: docker-compose.test.yml (ANONYMIZED_TELEMETRY=False) github.com
  9. Open WebUI: Running in offline mode docs.openwebui.com
  10. Open WebUI: env.py (ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS, OFFLINE_MODE) github.com
  11. Open WebUI: plugin.py (pip install of tool requirements) github.com
  12. Gradio: Environment Variables gradio.app
  13. Streamlit: config.toml docs.streamlit.io
  14. pip install: --no-index, --find-links, --require-hashes pip.pypa.io
  15. NLTK: Installing NLTK Data nltk.org
  16. Docker: None network driver docs.docker.com