AVH-Alignv2 / docker /docker-entrypoint.sh
huahua123313's picture
Add files using upload-large-folder tool
4960377 verified
Raw
History Blame Contribute Delete
577 Bytes
#!/usr/bin/env bash
# 容器启动钩子:如果挂载了 av_hubert/fairseq 仓库但还没做 editable install,自动补装。
# 这样宿主机只要把 AVH-Align 挂到 /workspace/AVH-Align,容器就能直接用 fairseq。
set -e
FAIRSEQ_DIR="/workspace/AVH-Align/av_hubert/fairseq"
if [ -d "$FAIRSEQ_DIR" ]; then
# 已挂载。检测是否已 editable install
if ! python -c "import fairseq" 2>/dev/null; then
echo "[docker-entrypoint] 首次运行:pip install -e $FAIRSEQ_DIR"
pip install -e "$FAIRSEQ_DIR" --no-deps --quiet
fi
fi
exec "$@"