circulartext commited on
Commit
8412325
·
1 Parent(s): 65b960c

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +10 -5
entrypoint.sh CHANGED
@@ -1,7 +1,12 @@
1
- #!/bin/bash
2
 
3
- # Activate the virtual environment
4
- source /path/to/your/virtualenv/bin/activate
 
 
5
 
6
- # Run the command passed as arguments to entrypoint.sh
7
- exec "$@"
 
 
 
 
1
+ #!/bin/sh
2
 
3
+ # Create a new user if the USER_ID environment variable is set
4
+ if [ -n "$USER_ID" ]; then
5
+ useradd -m -u "$USER_ID" user
6
+ fi
7
 
8
+ # Switch to the user
9
+ su - user
10
+
11
+ # Start the application
12
+ uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload