From 60b1c7a3b8c7737552e9f3dd7a5b963da53d89a3 Mon Sep 17 00:00:00 2001 From: Max Last Date: Tue, 27 May 2025 14:16:30 +0100 Subject: [PATCH 1/2] Create package-artifacts.yml --- .github/workflows/package-artifacts.yml | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/package-artifacts.yml diff --git a/.github/workflows/package-artifacts.yml b/.github/workflows/package-artifacts.yml new file mode 100644 index 0000000..53ca651 --- /dev/null +++ b/.github/workflows/package-artifacts.yml @@ -0,0 +1,46 @@ +name: Package Model Artifacts + +on: + workflow_dispatch: + +jobs: + build-and-package: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Create checkpoints directory + run: | + mkdir -p checkpoints + + - name: Download pretrained model weights from Hugging Face + run: | + wget -O checkpoints/depth_anything_v2_vitb.pth https://huggingface.co/Rain729/Prior-Depth-Anything/resolve/main/depth_anything_v2_vitb.pth + wget -O checkpoints/depth_anything_v2_vits.pth https://huggingface.co/Rain729/Prior-Depth-Anything/resolve/main/depth_anything_v2_vits.pth + wget -O checkpoints/prior_depth_anything_vitb.pth https://huggingface.co/Rain729/Prior-Depth-Anything/resolve/main/prior_depth_anything_vitb.pth + wget -O checkpoints/prior_depth_anything_vits.pth https://huggingface.co/Rain729/Prior-Depth-Anything/resolve/main/prior_depth_anything_vits.pth + + - name: Remove .git and other unnecessary files + run: | + rm -rf .git + + - name: Create artifact zip (code, requirements, checkpoints) + run: | + zip -r prior-depth-anything-artifacts.zip . -x "*.git*" "*.github*" "prior-depth-anything-artifacts.zip" + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: prior-depth-anything-artifacts + path: prior-depth-anything-artifacts.zip From 3d900ef3e8c872ecc4e22b5eee7f89f7caab9b54 Mon Sep 17 00:00:00 2001 From: Max Last Date: Tue, 27 May 2025 18:19:52 +0100 Subject: [PATCH 2/2] bla --- .github/workflows/package-artifacts.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package-artifacts.yml b/.github/workflows/package-artifacts.yml index 53ca651..47c61d1 100644 --- a/.github/workflows/package-artifacts.yml +++ b/.github/workflows/package-artifacts.yml @@ -15,6 +15,11 @@ jobs: with: python-version: "3.9" + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential libopenblas-dev libomp-dev + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -43,4 +48,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: prior-depth-anything-artifacts - path: prior-depth-anything-artifacts.zip + path: prior-depth-anything-artifacts.zip \ No newline at end of file