Browse Source

Fix CI/CD and make it possible to run the node hub script on all platform

fix-qwenvl
haixuantao 6 months ago
parent
commit
02afb4b9b1
3 changed files with 1340 additions and 4 deletions
  1. +31
    -3
      .github/workflows/node_hub_test.sh
  2. +0
    -1
      node-hub/dora-phi4/pyproject.toml
  3. +1309
    -0
      node-hub/dora-phi4/uv.lock

+ 31
- 3
.github/workflows/node_hub_test.sh View File

@@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash
set -euo set -euo


# Check if we are running in a GitHub Actions environment
CI=${GITHUB_ACTIONS:-false}

# List of ignored modules # List of ignored modules
ignored_folders=("dora-parler" "dora-opus" "dora-internvl" "dora-magma") ignored_folders=("dora-parler" "dora-opus" "dora-internvl" "dora-magma")


@@ -13,6 +16,31 @@ dir=$(pwd)
# Get the base name of the directory (without the path) # Get the base name of the directory (without the path)
base_dir=$(basename "$dir") base_dir=$(basename "$dir")


# Large node list requiring space cleanup
large_node=("dora-phi4")


# Check if the current directory is in the large node list and if we're in the CI environment
if [[ " ${large_node[@]} " =~ " ${base_dir} " ]] && [[ "$CI" == "true" ]]; then
echo "Running cleanup for $base_dir..."
sudo rm -rf /opt/hostedtoolcache/CodeQL || :
# 1.4GB
sudo rm -rf /opt/hostedtoolcache/go || :
# 489MB
sudo rm -rf /opt/hostedtoolcache/PyPy || :
# 376MB
sudo rm -rf /opt/hostedtoolcache/node || :
# Remove Web browser packages
sudo apt purge -y \
firefox \
google-chrome-stable \
microsoft-edge-stable
sudo rm -rf /usr/local/lib/android/
sudo rm -rf /usr/share/dotnet/
sudo rm -rf /opt/ghc/
fi


# Check if the directory name is in the ignored list # Check if the directory name is in the ignored list
if [[ " ${ignored_folders[@]} " =~ " ${base_dir} " ]]; then if [[ " ${ignored_folders[@]} " =~ " ${base_dir} " ]]; then
echo "Skipping $base_dir as we cannot test it on the CI..." echo "Skipping $base_dir as we cannot test it on the CI..."
@@ -69,7 +97,7 @@ else
maturin publish --target x86_64-apple-darwin --skip-existing --zig maturin publish --target x86_64-apple-darwin --skip-existing --zig
fi fi


elif [[ "$(uname)" = "Linux" ]]; then
elif [[ "$(uname)" = "Linux" ]] || [[ "$CI" == "false" ]]; then
if [ -f "$dir/Cargo.toml" ]; then if [ -f "$dir/Cargo.toml" ]; then
echo "Running build and tests for Rust project in $dir..." echo "Running build and tests for Rust project in $dir..."
cargo check cargo check
@@ -92,9 +120,9 @@ else
if [[ " ${skip_test_folders[@]} " =~ " ${base_dir} " ]]; then if [[ " ${skip_test_folders[@]} " =~ " ${base_dir} " ]]; then
echo "Skipping tests for $base_dir..." echo "Skipping tests for $base_dir..."
else else
uv run pytest
uv run pytest -x
fi fi
if [ "$GITHUB_EVENT_NAME" == "release" ] || [ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]; then
if [ "${GITHUB_EVENT_NAME:-false}" == "release" ] || [ "${GITHUB_EVENT_NAME:-false}" == "workflow_dispatch" ]; then
uv build uv build
uv publish --check-url https://pypi.org/simple uv publish --check-url https://pypi.org/simple
fi fi


+ 0
- 1
node-hub/dora-phi4/pyproject.toml View File

@@ -18,7 +18,6 @@ dependencies = [
"scipy==1.15.2", "scipy==1.15.2",
"backoff==2.2.1", "backoff==2.2.1",
"peft==0.13.2", "peft==0.13.2",
"bitsandbytes>=0.42.0",
"opencv-python", "opencv-python",
"requests", "requests",
] ]


+ 1309
- 0
node-hub/dora-phi4/uv.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save