File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 GO_VERSION : " 1.22.5"
1212
1313jobs :
14+ build-vnpu :
15+ runs-on : ubuntu-22.04-arm
16+ container :
17+ image : ghcr.io/dsfans2014/ascend-device-plugin/ascend-lib:0.2
18+ steps :
19+ - uses : actions/checkout@v4
20+ with :
21+ submodules : recursive
22+ - name : Install Rust
23+ uses : dtolnay/rust-toolchain@stable
24+ - name : Cache cargo
25+ uses : Swatinem/rust-cache@v2
26+ - name : Build
27+ run : cargo build --release
28+ working-directory : ./libvnpu
29+ - name : Prepare artifacts for upload
30+ run : |
31+ mkdir -p ./artifacts
32+ cp libvnpu/target/release/limiter ./artifacts/
33+ cp libvnpu/target/release/libvnpu.so ./artifacts/
34+ echo "/vnpu/libvnpu.so" > ./artifacts/ld.so.preload
35+ - name : upload artifacts
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : build-artifacts
39+ if-no-files-found : error
40+ path : ./artifacts/*
41+
1442 build :
1543 env :
1644 IMAGE_NAME : ${{ secrets.IMAGE_NAME || 'projecthami/ascend-device-plugin' }}
1745 runs-on : ubuntu-latest
46+ needs : ["build-vnpu"]
1847 steps :
1948 - uses : actions/checkout@v4
2049 with :
2554 id : branch-names
2655 uses : tj-actions/branch-names@v8
2756
57+ - name : Download Artifacts
58+ uses : actions/download-artifact@v4
59+ with :
60+ name : build-artifacts
61+ path : ./lib/hami-vnpu-core/
62+
2863 - name : Set up QEMU
2964 uses : docker/setup-qemu-action@v3
3065
3469 - name : Build and push
3570 uses : docker/build-push-action@v6
3671 with :
72+ context : .
3773 platforms : linux/amd64
3874 push : false
3975 build-args : |
Original file line number Diff line number Diff line change 1414 GO_VERSION : " 1.22.5"
1515
1616jobs :
17+ build-vnpu :
18+ runs-on : ubuntu-22.04-arm
19+ container :
20+ image : ghcr.io/dsfans2014/ascend-device-plugin/ascend-lib:0.2
21+ steps :
22+ - uses : actions/checkout@v4
23+ with :
24+ submodules : recursive
25+ - name : Install Rust
26+ uses : dtolnay/rust-toolchain@stable
27+ - name : Cache cargo
28+ uses : Swatinem/rust-cache@v2
29+ - name : Build
30+ run : cargo build --release
31+ working-directory : ./libvnpu
32+ - name : Prepare artifacts for upload
33+ run : |
34+ mkdir -p ./artifacts
35+ cp libvnpu/target/release/limiter ./artifacts/
36+ cp libvnpu/target/release/libvnpu.so ./artifacts/
37+ echo "/vnpu/libvnpu.so" > ./artifacts/ld.so.preload
38+ - name : upload artifacts
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : build-artifacts
42+ if-no-files-found : error
43+ path : ./artifacts/*
44+
1745 build :
1846 env :
1947 IMAGE_NAME : ${{ secrets.IMAGE_NAME || 'projecthami/ascend-device-plugin' }}
2048 runs-on : ubuntu-latest
49+ needs : ["build-vnpu"]
2150 steps :
2251 - uses : actions/checkout@v4
2352 with :
2857 id : branch-names
2958 uses : tj-actions/branch-names@v8
3059
60+ - name : Download Artifacts
61+ uses : actions/download-artifact@v4
62+ with :
63+ name : build-artifacts
64+ path : ./lib/hami-vnpu-core/
65+
3166 - name : Set up QEMU
3267 uses : docker/setup-qemu-action@v3
3368
4479 uses : docker/build-push-action@v6
4580 with :
4681 platforms : linux/amd64,linux/arm64
82+ context : .
4783 push : true
4884 build-args : |
4985 BASE_IMAGE=ubuntu:20.04
Original file line number Diff line number Diff line change 11[submodule "mind-cluster "]
22 path = mind-cluster
33 url = https://gitcode.com/Ascend/mind-cluster.git
4+ [submodule "libvnpu "]
5+ path = libvnpu
6+ url = https://github.com/Project-HAMi/hami-vnpu-core.git
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ RUN make all
2121FROM $BASE_IMAGE
2222ENV LD_LIBRARY_PATH=/usr/local/Ascend/driver/lib64:/usr/local/Ascend/driver/lib64/driver:/usr/local/Ascend/driver/lib64/common
2323COPY --from=build /build/ascend-device-plugin /usr/local/bin/ascend-device-plugin
24- COPY ./ lib/hami-vnpu-core/ /usr/local/hami-vnpu-core-assets/
24+ COPY --from=build /build/ lib/hami-vnpu-core/* /usr/local/hami-vnpu-core-assets/
2525
2626ENTRYPOINT ["ascend-device-plugin" ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments