Spaces:
Runtime error
Runtime error
| 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 | |