#!/bin/bash set -e # Create user with unique identifier (optional) # This example assumes your user management system sets the UID # You may need to adjust this based on your implementation if [ -z "$USER_ID" ]; then echo "USER_ID environment variable not set. Skipping user creation." else adduser --disabled-password --gecos "" --uid "$USER_ID" user su -l user fi # Load user's configuration (optional) if [ -f "user_config.json" ]; then export USER_CONFIG_PATH="/app/user_config.json" fi # Start the Hugging Face space application exec "$@"