Spaces:
Sleeping
Sleeping
Commit
·
26d8371
1
Parent(s):
42be730
Update entrypoint.sh
Browse files- entrypoint.sh +4 -16
entrypoint.sh
CHANGED
@@ -1,20 +1,8 @@
|
|
1 |
-
#!/bin/
|
2 |
set -e
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
-
# You may need to adjust this based on your implementation
|
7 |
-
if [ -z "$USER_ID" ]; then
|
8 |
-
echo "USER_ID environment variable not set. Skipping user creation."
|
9 |
-
else
|
10 |
-
adduser --disabled-password --gecos "" --uid "$USER_ID" user
|
11 |
-
su -l user
|
12 |
-
fi
|
13 |
|
14 |
-
#
|
15 |
-
if [ -f "user_config.json" ]; then
|
16 |
-
export USER_CONFIG_PATH="/app/user_config.json"
|
17 |
-
fi
|
18 |
-
|
19 |
-
# Start the Hugging Face space application
|
20 |
exec "$@"
|
|
|
1 |
+
#!/bin/sh
|
2 |
set -e
|
3 |
|
4 |
+
# Set permissions at runtime
|
5 |
+
chmod -R 777 /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
# Execute the main command
|
|
|
|
|
|
|
|
|
|
|
8 |
exec "$@"
|