circulartext commited on
Commit
c488865
·
verified ·
1 Parent(s): 70ff3d5

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +10 -2
entrypoint.sh CHANGED
@@ -1,8 +1,16 @@
1
  #!/bin/bash
 
2
  set -e
3
 
4
  # Specify the path to your main.py file
5
  MAIN_PATH="/app/main.py"
6
 
7
- # Run the Uvicorn server with your FastAPI application
8
- exec uvicorn "$MAIN_PATH:app" --host 0.0.0.0 --port 7860 --reload
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+
3
  set -e
4
 
5
  # Specify the path to your main.py file
6
  MAIN_PATH="/app/main.py"
7
 
8
+ # Create the user if it doesn't already exist
9
+ if id -u "$USER_ID" >/dev/null 2>&1; then
10
+ echo "User with ID $USER_ID already exists."
11
+ else
12
+ adduser --disabled-password --uid "$USER_ID" user
13
+ fi
14
+
15
+ # Switch to the user before starting the application
16
+ exec gosu user "$@"