Files
HSAP/docker/entrypoint.sh
jiacheng.lin 9d341bd4d4 fix: 修复 Windows 符号链接处理逻辑,确保 datasets 目录正确创建
fix: 修正当前图像选择逻辑,始终使用 items[0] 作为当前图像
2026-07-17 10:39:20 +08:00

26 lines
750 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
set -euo pipefail
cd /data/hsap
# 修复 Windows 符号链接Docker COPY 会把 symlink 复制为普通文件
# 检测 datasets/ 下的文件(应为目录),删除并重建为空目录
for d in datasets/lane datasets/adas; do
if [ -f "$d" ] && [ ! -L "$d" ]; then
echo "[entrypoint] 修复 Windows symlink: $d (文件 → 目录)"
rm -f "$d"
mkdir -p "$d"
fi
done
if [[ -d /data/workspace/DMS || -d /data/workspace/LaneDection ]]; then
echo "[entrypoint] 检测到外部 workspace重建软链…"
bash scripts/setup_links.sh || true
else
echo "[entrypoint] 使用仓库内嵌 algorithms/datasets"
fi
python scripts/wait_for_db.py
python scripts/db_migrate_from_sqlite.py 2>/dev/null || true
exec "$@"