Create a new user for the container runtime

without root permission
This commit is contained in:
mauwii
2023-02-07 22:31:44 +01:00
committed by Matthias Wild
parent e8f9ab82ed
commit 3833b28132
3 changed files with 26 additions and 15 deletions

View File

@ -22,7 +22,7 @@ docker run \
--name="${REPOSITORY_NAME,,}" \
--hostname="${REPOSITORY_NAME,,}" \
--mount=source="${VOLUMENAME}",target=/data \
${MODELSPATH:+-u "$(id -u):$(id -g)"} \
${MODELSPATH:+--user "$(id -u):$(id -g)"} \
${MODELSPATH:+--mount="type=bind,source=${MODELSPATH},target=/data/models"} \
${HUGGING_FACE_HUB_TOKEN:+--env="HUGGING_FACE_HUB_TOKEN=${HUGGING_FACE_HUB_TOKEN}"} \
--publish=9090:9090 \