Skip to content

Commit

Permalink
fix: docker build arm64
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <thxcode0824@gmail.com>
  • Loading branch information
thxCode committed Jul 21, 2024
1 parent d1964a7 commit 3c5aad4
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ jobs:
${{ matrix.arch == 'amd64' && '-DGGML_NATIVE=off' || '-DGGML_NATIVE=on' }} \
-DGGML_OPENMP=off
cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(nproc)
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
EOF
chmod +x /tmp/entrypoint.sh
cat /tmp/entrypoint.sh
Expand All @@ -189,13 +195,6 @@ jobs:
--entrypoint /entrypoint.sh \
rocm/dev-ubuntu-22.04:${{ matrix.version == '6.1' && '6.1.2' || '5.7.1' }}-complete
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
echo "===== PACKAGE ====="
mkdir -p ${{ github.workspace }}/out
zip -j ${{ github.workspace }}/out/llama-box-linux-${{ matrix.arch }}-hip-${{ matrix.version }}-${{ matrix.size }}.zip ${{ github.workspace }}/build/bin/*
Expand Down Expand Up @@ -273,6 +272,12 @@ jobs:
${{ matrix.arch == 'amd64' && '-DGGML_NATIVE=off' || '-DGGML_NATIVE=on' }} \
-DGGML_OPENMP=off
cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(nproc)
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
EOF
chmod +x /tmp/entrypoint.sh
cat /tmp/entrypoint.sh
Expand All @@ -290,13 +295,6 @@ jobs:
--entrypoint /entrypoint.sh \
nvidia/cuda:${{ matrix.version == '12.5' && '12.5.0' || '11.8.0' }}-devel-ubuntu22.04
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
echo "===== PACKAGE ====="
mkdir -p ${{ github.workspace }}/out
zip -j ${{ github.workspace }}/out/llama-box-linux-${{ matrix.arch }}-cuda-${{ matrix.version }}-${{ matrix.size }}.zip ${{ github.workspace }}/build/bin/*
Expand Down Expand Up @@ -362,6 +360,12 @@ jobs:
${{ matrix.arch == 'amd64' && '-DGGML_NATIVE=off' || '-DGGML_NATIVE=on' }} \
-DGGML_OPENMP=off
cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(nproc)
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
EOF
chmod +x /tmp/entrypoint.sh
cat /tmp/entrypoint.sh
Expand All @@ -380,13 +384,6 @@ jobs:
--entrypoint /entrypoint.sh \
intel/oneapi-basekit:${{ matrix.version == '2024.2' && '2024.2.0' || '2024.1.1' }}-devel-ubuntu22.04
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
echo "===== PACKAGE ====="
mkdir -p ${{ github.workspace }}/out
zip -j ${{ github.workspace }}/out/llama-box-linux-${{ matrix.arch }}-oneapi-${{ matrix.version }}.zip ${{ github.workspace }}/build/bin/*
Expand Down Expand Up @@ -452,6 +449,12 @@ jobs:
${{ matrix.arch == 'amd64' && '-DGGML_NATIVE=off' || '-DGGML_NATIVE=on' }} \
-DGGML_OPENMP=off
cmake --build ${{ github.workspace }}/build --target llama-box --config Release -- -j $(nproc)
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
EOF
chmod +x /tmp/entrypoint.sh
cat /tmp/entrypoint.sh
Expand All @@ -468,13 +471,6 @@ jobs:
--entrypoint /entrypoint.sh \
ascendai/cann:${{ matrix.version }}
echo "===== RESULT ====="
if [ -f ${{ github.workspace }}/build/bin/llama-box ]; then
ldd ${{ github.workspace }}/build/bin/llama-box
else
exit 1
fi
echo "===== PACKAGE ====="
mkdir -p ${{ github.workspace }}/out
zip -j ${{ github.workspace }}/out/llama-box-linux-${{ matrix.arch }}-cann-${{ matrix.version }}.zip ${{ github.workspace }}/build/bin/*
Expand Down

0 comments on commit 3c5aad4

Please sign in to comment.