# AI NAS Docker vs VM: GPU Passthrough, Storage, Security and Performance > Use Docker when the NAS OS exposes the required GPU/device runtime cleanly and you want several lightweight AI services sharing the host. Prefer a VM when you need a full Linux environment, driver independence, stronger isolation or a software stack that does not fit the NAS vendor's container implementation. In either case, keep persistent AI data outside disposable root filesystems and mount NAS shares with the minimum permissions required. Canonical: https://cloudzat.com/ai-nas-docker-vs-vm/ Use the canonical page for live hardware availability and current deployment guidance. ## Related Cloudzat guidance - [Ollama on NAS](https://cloudzat.com/ollama-on-nas/) - [Open WebUI on NAS](https://cloudzat.com/openwebui-on-nas/) - [AnythingLLM on NAS](https://cloudzat.com/anythingllm-on-nas/) - [n8n on NAS with Local AI](https://cloudzat.com/n8n-on-nas-local-ai/)