Spaces:
Sleeping
Sleeping
Commit
·
e62a97c
1
Parent(s):
76fdd19
Update entrypoint.sh
Browse files- entrypoint.sh +7 -7
entrypoint.sh
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
# Create a new user
|
| 6 |
-
useradd -m -u 1000 user
|
| 7 |
-
fi
|
| 8 |
|
| 9 |
-
#
|
|
|
|
|
|
|
|
|
|
| 10 |
su - user
|
| 11 |
|
| 12 |
# Start the application
|
| 13 |
-
uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload
|
|
|
|
| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
+
# Generate a unique user ID for this space
|
| 4 |
+
USER_ID=$(uuidgen)
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# Create a new user with the generated user ID
|
| 7 |
+
useradd -m -u "$USER_ID" user
|
| 8 |
+
|
| 9 |
+
# Switch to the new user
|
| 10 |
su - user
|
| 11 |
|
| 12 |
# Start the application
|
| 13 |
+
uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload
|