arozos / entrypoint.sh
mwask's picture
Rename endpoint.sh to entrypoint.sh
a8ab252 verified
Raw
History Blame Contribute Delete
540 Bytes
#!/bin/sh
set -e
# Hugging Face mounts persistent storage as 'root'.
# We need to give the 'arozos' user permission to write to it.
if [ "$(id -u)" = "0" ]; then
echo "[Entrypoint] Fixing permissions for persistent storage..."
chown -R arozos:arozos /data
echo "[Entrypoint] Dropping privileges to arozos user..."
# Start the app as the arozos user
exec su-exec arozos:arozos ./arozos -port 7860 -host 0.0.0.0
else
# If running locally without root, just start the app
exec ./arozos -port 7860 -host 0.0.0.0
fi