Skip to content

Commit c1c52f5

Browse files
authored
Update entrypoint.sh
non root
1 parent 2688923 commit c1c52f5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

services/forge/entrypoint.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ rsync -a --info=NAME ${ROOT}/models/karlo/ /data/models/karlo/
3131

3232
declare -A MOUNTS
3333

34-
MOUNTS["/root/.cache"]="/data/.cache"
34+
MOUNTS["${USER_HOME}/.cache"]="/data/.cache"
3535
MOUNTS["${ROOT}/models"]="/data/models"
3636

3737
MOUNTS["${ROOT}/embeddings"]="/data/embeddings"
@@ -56,11 +56,12 @@ for to_path in "${!MOUNTS[@]}"; do
5656
echo Mounted $(basename "${from_path}")
5757
done
5858

59-
echo "Installing extension dependencies (if any)"
60-
61-
# because we build our container as root:
62-
chown -R root ~/.cache/
59+
chown -R $PUID:$PGID ~/.cache/
6360
chmod 766 ~/.cache/
61+
chown -R $PUID:$PGID /output
62+
chmod 766 /output
63+
64+
echo "Installing extension dependencies (if any)"
6465

6566
shopt -s nullglob
6667
# For install.py, please refer to https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-extensions#installpy

0 commit comments

Comments
 (0)