Skip to content

Instantly share code, notes, and snippets.

View codeliger's full-sized avatar

Ben codeliger

  • Canada
View GitHub Profile
make -f Makefile.sync checkout
make -f Makefile.sync sync
cmake --preset "ROCm 6" -DCMAKE_INSTALL_PREFIX=/usr/local -B build
cmake --build build
cd build
make install
cd ..
go build .
sudo cp ./ollama /usr/local/bin/ollama
sudo systemctl restart ollama
@codeliger
codeliger / 9070XT-instructions.md
Last active April 5, 2025 17:09
How to use Ollama with a 9070 XT on Arch Linux

Update to linux kernel to 6.14.*

The Linux Kernel comes with a video card kernel driver called AMDGPU which only gets updated when you upgrade the kernel. You may be able to use the non-free closed source drivers without updating the kernel, but I haven't tried it. According to search engine results you need kernel 6.14 to get AMDGPU that has proper support for the 9070/XT.

  • Edit /etc/pacman.conf:

Uncomment this section:

[core-testing]
Include = /etc/pacman.d/mirrorlist
@codeliger
codeliger / test-rocm.py
Created December 20, 2024 16:46 — forked from damico/test-rocm.py
Script for testing PyTorch support with AMD GPUs using ROCM
import torch, grp, pwd, os, subprocess
devices = []
try:
print("\n\nChecking ROCM support...")
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE)
cmd_str = result.stdout.decode('utf-8')
cmd_split = cmd_str.split('Agent ')
for part in cmd_split:
item_single = part[0:1]
item_double = part[0:2]
@codeliger
codeliger / introspection-query.graphql
Created August 28, 2024 00:06 — forked from craigbeck/introspection-query.graphql
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
package test
import (
"bytes"
"crypto/rand"
"io"
"testing"
)
func generateRandomFile() io.Reader {
@codeliger
codeliger / instructions.md
Last active November 25, 2022 21:57
VS Code using id_rsa instead of custom ssh key

VS Code using id_rsa instead of custom ssh key

Add this section to your ~/.ssh/config (if it doesn't exist create it)

Host github.com
	User git
	HostName github.com
	AddKeysToAgent yes
	IdentityFile ~/.ssh/github
@codeliger
codeliger / updatego.sh
Created November 9, 2022 19:06
A function for .bashrc to update go to latest version
function updatego(){
GOVERSION=`git ls-remote --tags https://go.googlesource.com/go | grep -E "refs\/tags\/go[[:digit:]]*\.[[:digit:]]*(\.[[:digit:]]*)?$" | cut -f2 -- | sort -V | tail -n 1 | cut -d'/' -f3`
FILENAME=$GOVERSION.linux-amd64.tar.gz
FILEPATH="/home/$USER/$FILENAME"
URL=https://golang.org/dl/$FILENAME
echo "Downloading $URL"
echo "Saving to $FILEPATH"
echo "wget -nc -c -O $FILEPATH $URL"
wget -nc -c -O $FILEPATH $URL
sudo rm -rf /usr/local/go
@codeliger
codeliger / install-lineage-os-18-poco-f3.md
Last active March 8, 2022 19:20
Installing LineageOS 18 on Poco F3 Downgrading Android 12 to Android 11

Installing LineageOS 18 on Poco F3 Downgrading Android 12 to Android 11

I tried installing LineageOS following the instructions here: https://wiki.lineageos.org/devices/alioth/install

Problems:

  • I had android 12 not 11
  • The documentation provided does not describe how to downgrade Android 12 firmware to Android 11

Theres 3 modes that you need to understand the difference between:

@codeliger
codeliger / grub.cfg.diff
Created January 3, 2022 00:52
grub.cfg.diff
diff --git a/mnt/boot/grub/grub.cfg b/mnt/archliger/boot/grub/grub.cfg
old mode 100755
new mode 100644
index e0a49aa..64876ae
--- a/mnt/boot/grub/grub.cfg
+++ b/mnt/archliger/boot/grub/grub.cfg
@@ -85,7 +85,7 @@ if loadfont $font ; then
load_video
insmod gfxterm
set locale_dir=$prefix/locale
@codeliger
codeliger / NetworkManager.conf
Created January 28, 2020 16:34
Use resolvconf for dns
[main]
plugins=ifupdown,keyfile
dns=default
rc-manager=resolvconf
[ifupdown]
managed=false
[device]
wifi.scan-rand-mac-address=no