Odysseus / docker /entrypoint.sh
ASTAROTH0405's picture
Update docker/entrypoint.sh
0180be1 verified
Raw
History Blame Contribute Delete
805 Bytes
#!/bin/sh
set -e
PUID="${PUID:-1000}"
PGID="${PGID:-1000}"
if ! getent group "$PGID" >/dev/null 2>&1; then
groupadd -g "$PGID" odysseus
fi
if ! getent passwd "$PUID" >/dev/null 2>&1; then
useradd -u "$PUID" -g "$PGID" -M -s /bin/sh -d /app odysseus
fi
for dir in /app /app/data /app/logs; do
if [ -d "$dir" ]; then
find "$dir" -not -uid "$PUID" -print0 2>/dev/null | xargs -0 -r chown "$PUID:$PGID" 2>/dev/null || true
fi
done
for cu in /app/.local/lib/python*/site-packages/nvidia/cu13 \
/app/.local/lib/python*/site-packages/nvidia/cu12 \
/app/.local/lib/python*/site-packages/nvidia/cuda_nvcc; do
if [ -d "$cu" ]; then
export CUDA_HOME="$cu"
export VLLM_FLASHINFER_JIT_SAMPLER=0
break
fi
done
exec gosu "$PUID:$PGID" "$@"