feat: Add ROCm support and update Ollama configurations
- Created ansible playbooks for setting up AMD ROCm container environment. - Added ROCm and AMD Graphics repositories in ansible tasks. - Installed necessary ROCm packages including rocm-dkms and developer tools. - Updated Dockerfile for Ollama to use version 0.13.4 and created a new Dockerfile for ROCm support. - Enhanced game station scripts for better performance and added MangoHud configuration. - Modified systemd service files to allow CPU core allocation. - Updated playbooks for Ollama and Qwen2 to include new configurations and environment variables. - Added Wake-on-LAN systemd service configuration. - Updated Terraform configurations to include secret management for the web UI. - Refactored Kubernetes deployment for open-webui to include secret handling and improved volume management.
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
systemd_user_dir: "/home/{{ user_name }}/.config/systemd/user"
|
||||
systemd_system_dir: "/etc/systemd/system"
|
||||
grub_cfg: "/etc/default/grub"
|
||||
system_cores: "0,8"
|
||||
general_cores: "1-7,9-15"
|
||||
sunshine_cores: "1-7,9-15"
|
||||
screen_resolution: "{{ lookup('env', 'GAME_RESOLUTION') | d('1920x1080', true) }}"
|
||||
screen_width: "{{ screen_resolution.split('x')[0] }}"
|
||||
screen_height: "{{ screen_resolution.split('x')[1] }}"
|
||||
@@ -24,6 +27,8 @@
|
||||
- fbdev=1
|
||||
- mitigations=off
|
||||
- threadirqs
|
||||
# - nohz_full=1-7,9-15
|
||||
# - rcu_nocbs=1-7,9-15
|
||||
- drm.edid_firmware=DP-1:edid/aoc28e850.bin
|
||||
- video=DP-1:e
|
||||
- acpi_enforce_resources=lax
|
||||
@@ -58,6 +63,142 @@
|
||||
- lizardbyte/stable
|
||||
- atim/heroic-games-launcher
|
||||
|
||||
# # --- CachyOS Kernel (conditional) ---
|
||||
# - name: Detect supported x86_64 ISA levels
|
||||
# ansible.builtin.shell:
|
||||
# cmd: |
|
||||
# set -euo pipefail;
|
||||
# /lib64/ld-linux-x86-64.so.2 --help | grep -F "(supported, searched)"
|
||||
# register: glibc_loader_help
|
||||
# changed_when: false
|
||||
# failed_when: false
|
||||
|
||||
# - name: Determine CPU support for CachyOS kernel
|
||||
# ansible.builtin.set_fact:
|
||||
# has_x86_64_v3: "{{ ('x86-64-v3' in glibc_loader_help.stdout) or ('x86_64_v3' in glibc_loader_help.stdout) }}"
|
||||
# has_x86_64_v2: "{{ ('x86-64-v2' in glibc_loader_help.stdout) or ('x86_64_v2' in glibc_loader_help.stdout) }}"
|
||||
|
||||
# - name: Debug CPU ISA detection
|
||||
# ansible.builtin.debug:
|
||||
# msg: "CPU supports x86_64_v3: {{ has_x86_64_v3 }}, x86_64_v2: {{ has_x86_64_v2 }}"
|
||||
|
||||
# - name: Enable CachyOS COPR repository (kernel)
|
||||
# become: true
|
||||
# community.general.copr:
|
||||
# name: bieszczaders/kernel-cachyos
|
||||
# state: enabled
|
||||
# when: has_x86_64_v3 | bool or has_x86_64_v2 | bool
|
||||
|
||||
# - name: Enable CachyOS COPR repository (addons)
|
||||
# become: true
|
||||
# community.general.copr:
|
||||
# name: bieszczaders/kernel-cachyos-addons
|
||||
# state: enabled
|
||||
# when: has_x86_64_v3 | bool or has_x86_64_v2 | bool
|
||||
|
||||
# - name: Install CachyOS kernel for x86_64_v3 CPUs
|
||||
# become: true
|
||||
# ansible.builtin.dnf:
|
||||
# name:
|
||||
# - pesign
|
||||
# - openssl
|
||||
# - kernel-devel
|
||||
# - mokutil
|
||||
# - keyutils
|
||||
# - kernel-cachyos-lts
|
||||
# - kernel-cachyos-lts-devel
|
||||
# - uksmd
|
||||
# state: present
|
||||
# when: has_x86_64_v3 | bool
|
||||
|
||||
# - name: Ensures user is on /etc/pesign/users
|
||||
# become: true
|
||||
# ansible.builtin.lineinfile:
|
||||
# path: /etc/pesign/users
|
||||
# line: "{{ ansible_user }}"
|
||||
# state: present
|
||||
# when: has_x86_64_v3 | bool
|
||||
# notify: Run pesign
|
||||
|
||||
# - name: Run /usr/libexec/pesign/pesign-authorize
|
||||
# become: true
|
||||
# ansible.builtin.command: /usr/libexec/pesign/pesign-authorize
|
||||
# when: has_x86_64_v3 | bool
|
||||
# changed_when: false
|
||||
|
||||
# - name: Generate certificate for CachyOS kernel signing
|
||||
# become: true
|
||||
# ansible.builtin.shell: |
|
||||
# openssl req -new -x509 -newkey rsa:2048 -keyout "key.pem" \
|
||||
# -outform DER -out "cert.der" -nodes -days 36500 \
|
||||
# -subj "/CN=CachyOS Secure Boot/" && \
|
||||
# openssl pkcs12 -export -out key.p12 -inkey key.pem -in cert.der
|
||||
# when: has_x86_64_v3 | bool
|
||||
# changed_when: false
|
||||
# args:
|
||||
# executable: /bin/bash
|
||||
# creates:
|
||||
# - key.pem
|
||||
# - cert.der
|
||||
# - key.p12
|
||||
|
||||
# - name: Inform user to enroll MOK key
|
||||
# ansible.builtin.debug:
|
||||
# msg: |
|
||||
# Please enroll the MOK key for kernel module signing on next reboot.
|
||||
# Run:
|
||||
# sudo certutil -A -i cert.der -n "CachyOS Secure Boot" -d /etc/pki/pesign/ -t "Pu,Pu,Pu" && \
|
||||
# sudo pk12util -i key.p12 -d /etc/pki/pesign
|
||||
# sudo mokutil --import cert.der' if not prompted automatically.
|
||||
# when: has_x86_64_v3 | bool
|
||||
|
||||
# - name: Create /etc/kernel/postinst.d directory
|
||||
# become: true
|
||||
# ansible.builtin.file:
|
||||
# path: /etc/kernel/postinst.d
|
||||
# state: directory
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: "0755"
|
||||
|
||||
# - name: Enable Automatically signing kernel updates
|
||||
# become: true
|
||||
# ansible.builtin.copy:
|
||||
# dest: /etc/kernel/postinst.d/00-signing
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: "0755"
|
||||
# content: |
|
||||
# #!/bin/sh
|
||||
# set -e
|
||||
# KERNEL_IMAGE="$2"
|
||||
# MOK_KEY_NICKNAME="CachyOS Secure Boot"
|
||||
# if [ "$#" -ne "2" ] ; then
|
||||
# echo "Wrong count of command line arguments. This is not meant to be called directly." >&2
|
||||
# exit 1
|
||||
# fi
|
||||
# if [ ! -x "$(command -v pesign)" ] ; then
|
||||
# echo "pesign not executable. Bailing." >&2
|
||||
# exit 1
|
||||
# fi
|
||||
# if [ ! -w "$KERNEL_IMAGE" ] ; then
|
||||
# echo "Kernel image $KERNEL_IMAGE is not writable." >&2
|
||||
# exit 1
|
||||
# fi
|
||||
# echo "Signing $KERNEL_IMAGE..."
|
||||
# pesign --certificate "$MOK_KEY_NICKNAME" --in "$KERNEL_IMAGE" --sign --out "$KERNEL_IMAGE.signed"
|
||||
# mv "$KERNEL_IMAGE.signed" "$KERNEL_IMAGE"
|
||||
|
||||
# - name: Install CachyOS LTS kernel for x86_64_v2-only CPUs
|
||||
# become: true
|
||||
# ansible.builtin.dnf:
|
||||
# name:
|
||||
# - kernel-cachyos-lts
|
||||
# - kernel-cachyos-lts-devel-matched
|
||||
# state: present
|
||||
# when: (not has_x86_64_v3 | bool) and (has_x86_64_v2 | bool)
|
||||
|
||||
# --- Core system configuration ---
|
||||
- name: Ensure core gaming and streaming packages are installed
|
||||
become: true
|
||||
ansible.builtin.dnf:
|
||||
|
||||
Reference in New Issue
Block a user