Skip to content

fix#101

Merged
p-hoffmann merged 4 commits into
developfrom
p-hoffmann/circe
Jul 20, 2025
Merged

fix#101
p-hoffmann merged 4 commits into
developfrom
p-hoffmann/circe

Conversation

@p-hoffmann

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 20, 2025 14:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes Docker build issues related to copying shared libraries and handling the CIRCE native library dependency. The changes ensure proper library placement and add fallback handling for missing CIRCE components.

  • Adds CIRCE native library extraction and copying with fallback mechanisms
  • Fixes the ONNX runtime library copy destination path
  • Implements CIRCE revision tracking for better dependency management
Comment thread Dockerfile.trex
mv /usr/src/trex/target/${PROFILE}/trex /root
mv /usr/src/trex/target/${PROFILE}/trex /root && \
cp /usr/src/trex/target/${PROFILE}/build/circe-rust-wrapper-*/out/libcirce-native.so /root/ || true && \
CIRCE_REV=$(grep -A1 'circe.*git.*circe-be' ext/trex/Cargo.toml | grep 'rev' | sed 's/.*rev = "\([^"]*\)".*/\1/' | cut -c1-7) && \

Copilot AI Jul 20, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This complex shell pipeline for extracting the CIRCE revision is fragile and hard to maintain. Consider using a more robust approach like cargo metadata or breaking this into multiple steps with intermediate validation.

Copilot uses AI. Check for mistakes.
Comment thread Dockerfile.trex
Comment on lines +45 to +46
cp /usr/local/cargo/git/checkouts/circe-be-*/${CIRCE_REV}*/native-libs/linux-x86_64/libcirce-native.so /root/libcirce-native.so || \
echo "Warning: Could not find CIRCE native library for revision $CIRCE_REV"

Copilot AI Jul 20, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path pattern with multiple wildcards (/usr/local/cargo/git/checkouts/circe-be-/${CIRCE_REV}/) is brittle and may match unintended directories or fail unexpectedly. Consider using a more specific path resolution or add validation to ensure the correct directory is found.

Suggested change
cp /usr/local/cargo/git/checkouts/circe-be-*/${CIRCE_REV}*/native-libs/linux-x86_64/libcirce-native.so /root/libcirce-native.so || \
echo "Warning: Could not find CIRCE native library for revision $CIRCE_REV"
CIRCE_PATH=$(find /usr/local/cargo/git/checkouts/ -type d -path "*/circe-be-*" -path "*/${CIRCE_REV}*" -print -quit) && \
if [ -n "$CIRCE_PATH" ] && [ -f "$CIRCE_PATH/native-libs/linux-x86_64/libcirce-native.so" ]; then \
cp "$CIRCE_PATH/native-libs/linux-x86_64/libcirce-native.so" /root/libcirce-native.so; \
else \
echo "Warning: Could not find CIRCE native library for revision $CIRCE_REV"; \
fi
Copilot uses AI. Check for mistakes.
@p-hoffmann p-hoffmann merged commit 5423af7 into develop Jul 20, 2025
7 checks passed
@p-hoffmann p-hoffmann deleted the p-hoffmann/circe branch August 10, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants