Fix ollama
This commit is contained in:
parent
0e05208378
commit
75ed1c111a
|
@ -3,15 +3,23 @@ version: '3.9'
|
||||||
services:
|
services:
|
||||||
ollama:
|
ollama:
|
||||||
image: ollama/ollama:latest
|
image: ollama/ollama:latest
|
||||||
|
restart: always
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
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:
|
ports:
|
||||||
- 11434:11434
|
- 11434:11434
|
||||||
volumes:
|
volumes:
|
||||||
- ollama:/root/.ollama
|
- ollama:/root/.ollama
|
||||||
|
|
||||||
open-webui:
|
open-webui:
|
||||||
image: ghcr.io/open-webui/open-webui:git-cd92cf0
|
image: ghcr.io/open-webui/open-webui:main
|
||||||
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 3000:8080
|
- 3000:8080
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -22,3 +30,4 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
ollama: {}
|
ollama: {}
|
||||||
open-webui: {}
|
open-webui: {}
|
||||||
|
|
||||||
|
|
|
@ -4,19 +4,19 @@ H=$(date +%k)
|
||||||
|
|
||||||
if (( $H >= 0 && $H <= 7 )); then
|
if (( $H >= 0 && $H <= 7 )); then
|
||||||
/usr/bin/xrandr --output eDP --brightness .2
|
/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
|
elif (( $H > 7 && $H <= 10 )); then
|
||||||
/usr/bin/xrandr --output eDP --brightness .5
|
/usr/bin/xrandr --output eDP --brightness .5
|
||||||
sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 1
|
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
|
/usr/bin/xrandr --output eDP --brightness .7
|
||||||
sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 0
|
sudo /usr/bin/brightnessctl --device='asus::kbd_backlight' set 0
|
||||||
elif (( $H >= 17 && $H <= 22 )); then
|
elif (( $H >= 16 && $H <= 19 )); then
|
||||||
/usr/bin/xrandr --output eDP --brightness .5
|
/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
|
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
|
else
|
||||||
echo "Error"
|
echo "Error"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue