Spaces:
Runtime error
Runtime error
File size: 412 Bytes
4f4d115 c488865 4f4d115 4ede87b 6510d96 c488865 6b71af3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/bin/bash
set -e
# Specify the path to your main.py file
MAIN_PATH="/app/main.py"
# Create the user if it doesn't already exist
if id -u "$USER_ID" >/dev/null 2>&1; then
echo "User with ID $USER_ID already exists."
else
adduser --disabled-password --uid "$USER_ID" user
fi
# Switch to the user before starting the application
exec gosu user uvicorn "$MAIN_PATH:app" --host 0.0.0.0 --port 7860 --reload
|