Local AI
Why I mount model files read-only
A model file can be much larger than the application that loads it. I keep the collection on the host and give the inference container a read-only view.
Separate the two lifetimes
I can replace the model server image while keeping the model weights in place. Updating the collection is a separate step on the host, which also makes it easier to see what changed between two runs.
Choose a predictable path
The host directory can match the organization of the rest of my AI projects. The path inside the container can stay short. For example, this Compose volume makes a host directory available under /models.
volumes:
- ./models:/models:roA model preset that refers to a particular file should use the path visible inside the container. If the host folder structure changes, I check the mount and the preset together.
Keep writes intentional
Read-only access keeps a service from editing weights through that mount. Chats, generated images, and application settings need writable locations of their own. Making those locations explicit makes backups easier to reason about.