diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 1ccc0f5812..6a8f914018 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -63,7 +63,7 @@ mkdir -p $CARGO_TARGET_DIR uv pip uninstall --yes ai-dynamo ai-dynamo-runtime 2>/dev/null || true # Build project, with `dev` profile it will be saved at $CARGO_TARGET_DIR/debug -cargo build --locked --profile dev --features mistralrs +cargo build --locked --profile dev --features dynamo-llm/block-manager # install the python bindings @@ -82,13 +82,13 @@ cargo build --locked --profile dev --features mistralrs # installs overall python packages, grabs binaries from .build/target/debug cd $DYNAMO_HOME && retry env DYNAMO_BIN_PATH=$CARGO_TARGET_DIR/debug uv pip install -e . +{ set +x; } 2>/dev/null + echo -e "\n" >> ~/.bashrc echo "# === This section is generated by the post-create.sh script ===" >> ~/.bashrc -{ set +x; } 2>/dev/null - # Check if PYTHONPATH is already set in environment -if [ -n "$PYTHONPATH" ]; then +if [ -n "${PYTHONPATH:-}" ]; then # PYTHONPATH exists, replace /workspace with $DYNAMO_HOME export PYTHONPATH=$(echo "$PYTHONPATH" | sed "s|/workspace|$DYNAMO_HOME|g") # Also add to .bashrc for persistence @@ -122,13 +122,13 @@ fi # Unset empty tokens/variables to avoid issues with authentication and SSH if ! grep -q "# Unset empty tokens" ~/.bashrc; then echo -e "\n# Unset empty tokens and environment variables" >> ~/.bashrc - echo '[ -z "$HF_TOKEN" ] && unset HF_TOKEN' >> ~/.bashrc - echo '[ -z "$GITHUB_TOKEN" ] && unset GITHUB_TOKEN' >> ~/.bashrc - echo '[ -z "$SSH_AUTH_SOCK" ] && unset SSH_AUTH_SOCK' >> ~/.bashrc + echo '[ -z "${HF_TOKEN:-}" ] && unset HF_TOKEN' >> ~/.bashrc + echo '[ -z "${GITHUB_TOKEN:-}" ] && unset GITHUB_TOKEN' >> ~/.bashrc + echo '[ -z "${SSH_AUTH_SOCK:-}" ] && unset SSH_AUTH_SOCK' >> ~/.bashrc fi # Check SSH agent forwarding status -if [ -n "$SSH_AUTH_SOCK" ]; then +if [ -n "${SSH_AUTH_SOCK:-}" ]; then if ssh-add -l > /dev/null 2>&1; then echo "SSH agent forwarding is working - found $(ssh-add -l | wc -l) key(s):" ssh-add -l