Fix ollama

This commit is contained in:
shutkin.k 2025-01-19 09:09:35 +03:00
parent 0e05208378
commit 75ed1c111a
2 changed files with 17 additions and 8 deletions

View File

@ -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: {}

View File

@ -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