Skip to content

Commit 9c519f4

Browse files
Squash (#43)
* Main (#40) * Create build-ci.yml * Update build-ci.yml * Bump the pip group across 2 directories with 2 updates --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production dependency-group: pip - dependency-name: aiohttp dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> * Update aiohttp requirement --- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> * Bump the pip group across 1 directory with 6 updates Bumps the pip group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [certifi](https://github.com/certifi/python-certifi) | `2024.2.2` | `2024.7.4` | | [idna](https://github.com/kjd/idna) | `3.6` | `3.7` | | [jinja2](https://github.com/pallets/jinja) | `3.1.3` | `3.1.5` | | [requests](https://github.com/psf/requests) | `2.31.0` | `2.32.2` | | [tqdm](https://github.com/tqdm/tqdm) | `4.66.2` | `4.66.3` | | [urllib3](https://github.com/urllib3/urllib3) | `2.2.1` | `2.2.2` | Updates `certifi` from 2024.2.2 to 2024.7.4 - [Commits](certifi/python-certifi@2024.02.02...2024.07.04) Updates `idna` from 3.6 to 3.7 - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](kjd/idna@v3.6...v3.7) Updates `jinja2` from 3.1.3 to 3.1.5 - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](pallets/jinja@3.1.3...3.1.5) Updates `requests` from 2.31.0 to 2.32.2 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.31.0...v2.32.2) Updates `tqdm` from 4.66.2 to 4.66.3 - [Release notes](https://github.com/tqdm/tqdm/releases) - [Commits](tqdm/tqdm@v4.66.2...v4.66.3) Updates `urllib3` from 2.2.1 to 2.2.2 - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.2.1...2.2.2) --- updated-dependencies: - dependency-name: certifi dependency-type: indirect dependency-group: pip - dependency-name: idna dependency-type: indirect dependency-group: pip - dependency-name: jinja2 dependency-type: indirect dependency-group: pip - dependency-name: requests dependency-type: direct:production dependency-group: pip - dependency-name: tqdm dependency-type: indirect dependency-group: pip - dependency-name: urllib3 dependency-type: indirect dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump requests from 2.31.0 to 2.32.2 in the pip group across 1 directory Bumps the pip group with 1 update in the / directory: [requests](https://github.com/psf/requests). Updates `requests` from 2.31.0 to 2.32.2 - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](psf/requests@v2.31.0...v2.32.2) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> * Update build-ci.yml * Update build-ci.yml * Update build-ci.yml * Update build-ci.yml * Update build-ci.yml * Update build-ci.yml * Update build-ci.yml * Update build-ci.yml * Bump transformers in the pip group across 1 directory Bumps the pip group with 1 update in the / directory: [transformers](https://github.com/huggingface/transformers). Updates `transformers` from 4.38.1 to 4.48.0 - [Release notes](https://github.com/huggingface/transformers/releases) - [Commits](huggingface/transformers@v4.38.1...v4.48.0) --- updated-dependencies: - dependency-name: transformers dependency-type: direct:production dependency-group: pip ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 369be55 commit 9c519f4

File tree

4 files changed

+305
-174
lines changed

4 files changed

+305
-174
lines changed

.github/workflows/build-ci.yml

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
name: JUSTBUILD
2+
3+
on:
4+
workflow_dispatch: # allows manual triggering
5+
inputs:
6+
create_release:
7+
description: "Create new release"
8+
required: true
9+
type: boolean
10+
push:
11+
branches:
12+
- master
13+
paths:
14+
[
15+
".github/workflows/build-ci.yml",
16+
"**/CMakeLists.txt",
17+
"**/Makefile",
18+
"**/*.h",
19+
"**/*.hpp",
20+
"**/*.c",
21+
"**/*.cpp",
22+
"**/*.cu",
23+
"**/*.cuh",
24+
"**/*.swift",
25+
"**/*.m",
26+
"**/*.metal",
27+
]
28+
pull_request:
29+
types: [opened, synchronize, reopened]
30+
paths:
31+
[
32+
".github/workflows/build-ci.yml",
33+
"**/CMakeLists.txt",
34+
"**/Makefile",
35+
"**/*.h",
36+
"**/*.hpp",
37+
"**/*.c",
38+
"**/*.cpp",
39+
"**/*.cu",
40+
"**/*.cuh",
41+
"**/*.swift",
42+
"**/*.m",
43+
"**/*.metal",
44+
]
45+
46+
concurrency:
47+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
48+
cancel-in-progress: true
49+
50+
# Fine-grant permission
51+
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
52+
#permissions:
53+
# contents: write # for creating release
54+
permissions: write-all
55+
56+
env:
57+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
58+
#GGML_NLOOP: 3
59+
#GGML_N_THREADS: 1
60+
#LLAMA_LOG_COLORS: 1
61+
#LLAMA_LOG_PREFIX: 1
62+
#LLAMA_LOG_TIMESTAMPS: 1
63+
64+
jobs:
65+
# CUDA Release
66+
67+
ubuntu-latest-cuda-cmake:
68+
runs-on: ubuntu-latest
69+
70+
steps:
71+
#- name: Free Disk Space (Ubuntu)
72+
# uses: jlumbroso/free-disk-space@main
73+
# with:
74+
# this might remove tools that are actually needed,
75+
# if set to "true" but frees about 6 GB
76+
# tool-cache: true
77+
78+
# all of these default to true, but feel free to set to
79+
# "false" if necessary for your workflow
80+
# android: true
81+
# dotnet: true
82+
# haskell: true
83+
# large-packages: false
84+
# docker-images: true
85+
# swap-storage: false
86+
87+
- name: Clone
88+
id: checkout
89+
uses: actions/checkout@v4
90+
with:
91+
fetch-depth: 0
92+
93+
- name: Dependencies
94+
id: depends
95+
run: |
96+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
97+
sudo dpkg -i cuda-keyring_1.1-1_all.deb
98+
sudo apt-get update # Run apt-get update only once
99+
sudo apt-get install -y build-essential libcurl4-openssl-dev ccache cuda-12-6
100+
# sudo apt install software-properties-common
101+
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test
102+
# sudo apt update
103+
# sudo apt install gcc-13 g++-13
104+
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 --slave /usr/bin/g++ g++ /usr/bin/g++-13
105+
106+
- name: Build
107+
id: cmake_build
108+
run: |
109+
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
110+
export LD_LIBRARY_PATH=/usr/local/cuda/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
111+
mkdir build
112+
cd build
113+
cmake .. -DLLAMA_FATAL_WARNINGS=OFF -DBUILD_SHARED_LIBS=ON \
114+
-DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="86" \
115+
-DCMAKE_C_FLAGS_RELEASE="-Ofast -DNDEBUG -flto -fno-finite-math-only -march=znver3" \
116+
-DCMAKE_CXX_FLAGS_RELEASE="-Ofast -DNDEBUG -flto -march=znver3" \
117+
-DCMAKE_CUDA_FLAGS_RELEASE="-O3 -DNDEBUG -Xcompiler=-Ofast,-march=znver3" \
118+
-DCMAKE_LINK_FLAGS_RELEASE="-flto -threads" # Add linker flags for parallel LTO
119+
cmake --build . --config Release -j $(nproc)
120+
121+
- name: Determine tag name
122+
id: tag
123+
shell: bash
124+
run: |
125+
BUILD_NUMBER="$(git rev-list --count HEAD)"
126+
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
127+
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
128+
echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
129+
else
130+
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
131+
echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
132+
fi
133+
134+
- name: Pack artifacts
135+
id: pack_artifacts
136+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
137+
run: |
138+
cp LICENSE ./build/bin/
139+
# cp $(find . -name "*.so") ./build/bin/ # Not needed anymore
140+
zip -r -j cudart-server-${{ steps.tag.outputs.name }}-rtx30-ubuntu-x64.zip ./build/bin/*
141+
142+
- name: Upload artifacts
143+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
144+
uses: actions/upload-artifact@v4
145+
with:
146+
path: cudart-server-${{ steps.tag.outputs.name }}-rtx30-ubuntu-x64.zip
147+
name: cudart-server-rtx30-ubuntu-x64.zip
148+
149+
# TODO: build with GGML_NO_METAL because test-backend-ops fail on "Apple Paravirtual device" and I don't know
150+
# how to debug it.
151+
# ref: https://github.com/ggerganov/llama.cpp/actions/runs/7131777249/job/19420981052#step:5:1124
152+
153+
release:
154+
permissions: write-all
155+
156+
157+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
158+
159+
runs-on: ubuntu-latest
160+
161+
needs:
162+
- ubuntu-latest-cuda-cmake
163+
#- ubuntu-latest-vulkan-cmake
164+
165+
steps:
166+
- name: Clone
167+
id: checkout
168+
uses: actions/checkout@v4
169+
with:
170+
fetch-depth: 0
171+
172+
- name: Determine tag name
173+
id: tag
174+
shell: bash
175+
run: |
176+
BUILD_NUMBER="$(git rev-list --count HEAD)"
177+
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
178+
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
179+
echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
180+
else
181+
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
182+
echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
183+
fi
184+
185+
- name: Download artifacts
186+
id: download-artifact
187+
uses: actions/download-artifact@v4
188+
with:
189+
path: ./artifact
190+
191+
- name: Move artifacts
192+
id: move_artifacts
193+
run: mkdir -p ./artifact/release && mv ./artifact/*/*.zip ./artifact/release
194+
195+
- name: Create release
196+
id: create_release
197+
uses: anzz1/action-create-release@v1
198+
env:
199+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
200+
with:
201+
tag_name: ${{ steps.tag.outputs.name }}
202+
203+
- name: Upload release
204+
id: upload_release
205+
uses: actions/github-script@v3
206+
with:
207+
github-token: ${{secrets.GITHUB_TOKEN}}
208+
script: |
209+
const path = require('path');
210+
const fs = require('fs');
211+
const release_id = '${{ steps.create_release.outputs.id }}';
212+
for (let file of await fs.readdirSync('./artifact/release')) {
213+
if (path.extname(file) === '.zip') {
214+
console.log('uploadReleaseAsset', file);
215+
await github.repos.uploadReleaseAsset({
216+
owner: context.repo.owner,
217+
repo: context.repo.repo,
218+
release_id: release_id,
219+
name: file,
220+
data: await fs.readFileSync(`./artifact/release/${file}`)
221+
});
222+
}
223+
}

examples/llava/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-r ../../requirements/requirements-convert_legacy_llama.txt
22
--extra-index-url https://download.pytorch.org/whl/cpu
3-
pillow~=10.2.0
3+
pillow~=11.1.0
44
torch~=2.2.1
55
torchvision~=0.17.1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
aiohttp~=3.9.3
1+
aiohttp~=3.11.12
22
pytest~=8.3.3
33
huggingface_hub~=0.23.2
44
numpy~=1.26.4
55
openai~=1.55.3
66
prometheus-client~=0.20.0
7-
requests~=2.32.3
7+
requests~=2.32.2
88
wget~=3.2

0 commit comments

Comments
 (0)