Fix ml-service volume permissions

This commit is contained in:
Marko Djordjevic 2026-02-18 22:49:10 +01:00
parent 7af1c75c56
commit e446e3e563
2 changed files with 21 additions and 2 deletions

13
services/ml/entrypoint.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
set -eu
# Fix permissions on mounted volumes so the non-root user can write.
# If the volume is root-owned (common on first run), chown it once.
if [ -d /app/data ]; then
chown -R appuser:appuser /app/data || true
fi
if [ -d /app/mlruns ]; then
chown -R appuser:appuser /app/mlruns || true
fi
exec gosu appuser "$@"