Fix ml-service volume permissions
This commit is contained in:
parent
7af1c75c56
commit
e446e3e563
2 changed files with 21 additions and 2 deletions
13
services/ml/entrypoint.sh
Normal file
13
services/ml/entrypoint.sh
Normal 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 "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue