diff --git a/ollama-stack.yaml b/ollama-stack.yaml index fd9f9bf..677486e 100644 --- a/ollama-stack.yaml +++ b/ollama-stack.yaml @@ -3,15 +3,23 @@ version: '3.9' services: ollama: image: ollama/ollama:latest + restart: always deploy: replicas: 1 + resources: + reservations: + devices: + - driver: nvidia + capabilities: ["compute", "gpu", "utility", "graphics"] + count: all # Adjust count for the number of GPUs you want to use ports: - 11434:11434 volumes: - ollama:/root/.ollama open-webui: - image: ghcr.io/open-webui/open-webui:git-cd92cf0 + image: ghcr.io/open-webui/open-webui:main + restart: always ports: - 3000:8080 volumes: @@ -22,3 +30,4 @@ services: volumes: ollama: {} open-webui: {} + diff --git a/set_brightness.sh b/set_brightness.sh index b70305d..f70835c 100755 --- a/set_brightness.sh +++ b/set_brightness.sh @@ -4,19 +4,19 @@ H=$(date +%k) if (( $H >= 0 && $H <= 7 )); then /usr/bin/xrandr --output eDP --brightness .2 - sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 3 + sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 1 elif (( $H > 7 && $H <= 10 )); then /usr/bin/xrandr --output eDP --brightness .5 sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 1 -elif (( $H > 10 && $H < 17 )); then +elif (( $H > 10 && $H < 16 )); then /usr/bin/xrandr --output eDP --brightness .7 sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 0 -elif (( $H >= 17 && $H <= 22 )); then - /usr/bin/xrandr --output eDP --brightness .5 +elif (( $H >= 16 && $H <= 19 )); then + /usr/bin/xrandr --output eDP --brightness .4 + sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 1 +elif (( $H > 19 && $H <= 23 )); then + /usr/bin/xrandr --output eDP --brightness .3 sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 1 -elif (( $H > 22 && $H <= 23 )); then - /usr/bin/xrandr --output eDP --brightness .3 - sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 2 else echo "Error" fi