Skip to content

Add CACHE_DIR to allow moving cache location#882

Open
akiller wants to merge 2 commits intoHumanSignal:masterfrom
akiller:master
Open

Add CACHE_DIR to allow moving cache location#882
akiller wants to merge 2 commits intoHumanSignal:masterfrom
akiller:master

Conversation

@akiller
Copy link
Copy Markdown

@akiller akiller commented Apr 8, 2026

Currently the model cache file is written to the location of the MODEL_DIR environment variable if set.

I want to deploy the label studio ML backend to an Azure container app. My model is persisted to an Azure storage file share mounted at /app/models and so my MODEL_DIR is set to /app/models.

But Azure files don't work with Sqlite database, and it will error with Error: SQLITE_BUSY: database is locked

I want to add a new CACHE_DIR environment variable which will allow the cache to be moved to an alternative location inside the container which should fix my problem.

If not set, it will fallback to using MODEL_DIR so it shouldn't cause any problems for existing users.

I haven't tested this (sorry!).

@akiller
Copy link
Copy Markdown
Author

akiller commented Apr 12, 2026

I haven't tested this (sorry!).

I have now tried this on Azure and it does work with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant