ParisNeo/lollms-webui

Webui.sh not running on redhat

SecretAardvark opened this issue · 3 comments

Expected Behavior

Webui.sh should install and run the gpt4all ui on my redhat-based system just like it does on ubuntu.

Current Behavior

It doesn't run because i'm on the wrong OS.

Steps to Reproduce

Please provide detailed steps to reproduce the issue.

  1. On first run, bash gave me these errors:
webui.sh: line 36: $'\r': command not found
webui.sh: line 122: syntax error near unexpected token `$'do\r''
webui.sh: line 122: `      select option in "Download" "Download using browser" 'Skip"; do

Bard told me to run dos2unix webui.sh and that seemed to work.

  1. From there, the script runs and skipped over installing git and python 3.10 (i had both on my system already) but failed when installing venv. sudo: apt: command not found. (Fedora, not Ubuntu) I edited lines 96 and 97 from sudo apt ... to sudo dnf ... and it installed venv succesfully but would not run and create the venv. I suspect this is because i have conda on my machine.

  2. From there i used conda to create and activate a new env, installed requirements.txt, manually downloaded a model and placed it in the proper folder, and ran app.py. Everything loaded as expected.

Possible Solution

If you don't have Conda installed, i suspect all you need to do is run dos2unix and change all of the sudo apt ... to sudo dnf... and the script should install and run on redhat based systems just fine.

we need a fedora redhat installer as the webui.sh is more of a debian thing.
If you want build a webui.sh version and do a pull request. I'll check it and accept it.

Expected Behavior

Webui.sh should install and run the gpt4all ui on my redhat-based system just like it does on ubuntu.

Current Behavior

It doesn't run because i'm on the wrong OS.

Steps to Reproduce

Please provide detailed steps to reproduce the issue.

1. On first run, bash gave me these errors:
webui.sh: line 36: $'\r': command not found
webui.sh: line 122: syntax error near unexpected token `$'do\r''
webui.sh: line 122: `      select option in "Download" "Download using browser" 'Skip"; do

Bard told me to run dos2unix webui.sh and that seemed to work.

2. From there, the script runs and skipped over installing git and python 3.10 (i had both on my system already) but failed when installing venv. `sudo: apt: command not found`. (Fedora, not Ubuntu) I edited lines 96 and 97 from `sudo apt ... ` to `sudo dnf ...`  and it installed venv succesfully but would not run and create the venv. I suspect this is because i have conda on my machine.

3. From there i used conda to create and activate a new env, installed requirements.txt, manually downloaded a model and placed it in the proper folder, and ran app.py. Everything loaded as expected.

Possible Solution

If you don't have Conda installed, i suspect all you need to do is run dos2unix and change all of the sudo apt ... to sudo dnf... and the script should install and run on redhat based systems just fine.

This happening because the file webui.sh have windows ends format.
Fix this issue usin VIM editor:
vim webui.sh :set fileformat=unix :wq
Now ./webui.sh should work.

Hi, thank you very much. It is exactly that. Those days I have no linux machine so I code the linux part blindly on windows and pray it will work. Obviously my prayres don't work at all lool.

If you can update the file and do a pull request, that could be nice.