Skip to content

Commit 08233f9

Browse files
Merge pull request #1148 from microsoft/fix/devcontainer-venv-path
fix: Dev Container venv path to avoid Docker bind-mount OSError
2 parents cb53795 + 82a8843 commit 08233f9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

infra/scripts/post-provision/post_deploy.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ resource_group=""
1616
user_principal_id=""
1717
ai_foundry_resource_id=""
1818
python_cmd=""
19-
venv_path="$SCRIPT_DIR/scriptenv"
19+
# Dev container bind-mounts cause OSError on large packages; use $HOME Path instead.
20+
if [ -n "${REMOTE_CONTAINERS:-}" ] || [ -n "${CODESPACES:-}" ] || [ -f "/run/.containerenv" ] || grep -qF "microsoft.com/devcontainers" /etc/os-release 2>/dev/null; then
21+
venv_path="$HOME/.macae-post-provision-env"
22+
else
23+
venv_path="$SCRIPT_DIR/scriptenv"
24+
fi
2025

2126
st_is_public_access_disabled=false
2227
srch_is_public_access_disabled=false

0 commit comments

Comments
 (0)