Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1#!/usr/bin/env bash2 3# initialize a new worktree from a PR number:4#5# - creates a new remote using the fork's clone URL6# - creates a local branch tracking the remote branch7# - creates a new worktree in a parent folder, suffixed with "-pr-$PR"8#9# sample usage:10# ./scripts/pr2wt.sh 1234511# ./scripts/pr2wt.sh 12345 opencode12# ./scripts/pr2wt.sh 12345 "cmake -B build && cmake --build build"13# ./scripts/pr2wt.sh 12345 "bash -l"14 15function usage() {16 echo "usage: $0 <pr_number> [cmd]"17 exit 118}19 20# check we are in the right directory21if [[ ! -f "scripts/pr2wt.sh" ]]; then22 echo "error: this script must be run from the root of the repository"23 exit 124fi25 26if [[ $# -lt 1 || $# -gt 2 ]]; then27 usage28fi29 30PR=$131[[ "$PR" =~ ^[0-9]+$ ]] || { echo "error: PR number must be numeric"; exit 1; }32 33url_origin=$(git config --get remote.upstream.url 2>/dev/null) || \34url_origin=$(git config --get remote.origin.url) || {35 echo "error: no remote named 'upstream' or 'origin' in this repository"36 exit 137}38 39# Extract org/repo from either https or ssh format.40if [[ $url_origin =~ ^git@ ]]; then41 org_repo=$(echo $url_origin | cut -d: -f2)42else43 org_repo=$(echo $url_origin | cut -d/ -f4-)44fi45org_repo=${org_repo%.git}46 47echo "org/repo: $org_repo"48 49meta=$(curl -sSLf -H "Accept: application/vnd.github+json" "https://api.github.com/repos/$org_repo/pulls/$PR")50 51url_remote=$(echo "$meta" | jq -r '.head.repo.clone_url')52head_ref=$(echo "$meta" | jq -r '.head.ref')53 54echo "url: $url_remote"55echo "head_ref: $head_ref"56 57url_remote_cur=$(git config --get "remote.pr/$PR.url" 2>/dev/null || true)58 59if [[ "$url_remote_cur" != "$url_remote" ]]; then60 git remote rm pr/$PR 2> /dev/null61 git remote add pr/$PR "$url_remote"62fi63 64git fetch "pr/$PR" "$head_ref"65 66dir=$(basename $(pwd))67 68git branch -D pr/$PR 2> /dev/null69git worktree add -b pr/$PR ../$dir-pr-$PR pr/$PR/$head_ref 2> /dev/null70 71og_path=$(pwd)72wt_path=$(cd ../$dir-pr-$PR && pwd)73 74echo "git worktree created in $wt_path"75 76cd $wt_path77 78# pi agent setup in the worktree79if [[ -f "$og_path/.pi/SYSTEM.md" && ! -f ".pi/SYSTEM.md" ]]; then80 mkdir -p .pi81 ln -sfn "$og_path/.pi/SYSTEM.md" .pi/SYSTEM.md82fi83 84git branch --set-upstream-to=pr/$PR/$head_ref85git pull --ff-only || {86 echo "error: failed to pull pr/$PR"87 exit 188}89 90if [[ $# -eq 2 ]]; then91 echo "executing: $2"92 eval "$2"93fi94 