LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

Mount backends externally in AIO

Open logmod opened this issue 1 month ago • 2 comments

I have mounted /backends externally because I did not want to re-install all the backend binaries each time I start the container.

I have added this line to my compose file:

- ~/localai/backends:/backends

Not sure why this is not the recommended practice, but it works for me and now the startup of the container is almost instant. Please indicate if there are downsides/caveats to be considered. If nothing serious, consider adding this to the "Run with container images" docs.

logmod avatar Nov 08 '25 13:11 logmod

Thanks for calling this out, I've done similar now to also dictate the storage location of the backends.

loryanstrant avatar Nov 20 '25 23:11 loryanstrant

Hello, you can also find the doc here if you want to build your own OCI backend image. Be careful if you expect to store your code online you could have some storage issue with gihub (especially if you want to store the virtual env which spend a lot of time during the deployment phasis).

gmaOCR avatar Nov 23 '25 15:11 gmaOCR