File size: 555 Bytes
b959ebe
 
45e3447
aa82c4e
 
 
 
 
 
3f0e6c7
 
b959ebe
5783142
aa82c4e
 
 
 
755d21d
aa82c4e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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 "$@"