openchatai / OpenChat

LLMs custom-chatbots console ⚡
https://open.cx
MIT License
5.17k stars 642 forks source link

Install errors #6

Closed talpap closed 1 year ago

talpap commented 1 year ago

Hi

Seems to be cool repo. Kudos!

Have tried to install it in all possible ways but facing this error:

PS C:\Users\Tal\VScode\OpenChat> make install "\033[1m=== Putting the services down (if already running) ===\033[0m" docker-compose down --remove-orphans Removing network openchat_openchat_network WARNING: Network openchat_openchat_network not found. "\033[1m=== Setting up Docker environment ===\033[0m" "\033[1m=== This will overwrite your .env files, you still have some time to abort ===\033[0m" process_begin: CreateProcess(NULL, sleep 5, ...) failed. make (e=2): The system cannot find the file specified. make: *** [Makefile:16: install] Error 2 PS C:\Users\Tal\VScode\OpenChat>

Do I have to do anything else except of what is written in Installation guide?

Working on Windows 10, VScode, have make installed..., Dovcker Desktop as well

talpap commented 1 year ago

P.S.

All keys are set and rechecked many times

roytaas commented 1 year ago

I had the same problem and installed chocolatey to use the make command; https://chocolatey.org/install

Drehabaziz commented 1 year ago

Same Error Here process_begin: CreateProcess(NULL, sleep 5, ...) failed. make (e=2): The system cannot find the file specified. make: *** [Makefile:16: install] Error 2

gharbat commented 1 year ago

It seems that for windows there is a problem with the native support for Make.

Can you try to use https://chocolatey.org/install and let me know if it fix it? if yes, I will update the readme to reflect it.

Drehabaziz commented 1 year ago

Hi, Thanks for the prompt reply, At the start, it refused to run Make and that is when I installed Choco. Now it runs Make but returns an error as cannot copy file. Seems like. Env "" make install "\033[1m=== Putting the services down (if already running) ===\033[0m" docker-compose down --remove-orphans "\033[1m=== Setting up Docker environment ===\033[0m" "\033[1m=== This will overwrite your .env files, you still have some time to abort ===\033[0m" process_begin: CreateProcess(NULL, sleep 5, ...) failed. make (e=2): The system cannot find the file specified. make: *** [Makefile:16: install] Error 2""

talpap commented 1 year ago

Hey. Followed the suggestions:

C:\Users\Tal>where make C:\ProgramData\chocolatey\bin\make.exe

C:\Users\Tal>

Nothing works , unfortunately (:

PS C:\Users\Tal\VScode\OpenChat> make install "\033[1m=== Putting the services down (if already running) ===\033[0m" docker-compose down --remove-orphans Removing network openchat_openchat_network WARNING: Network openchat_openchat_network not found. "\033[1m=== Setting up Docker environment ===\033[0m" "\033[1m=== This will overwrite your .env files, you still have some time to abort ===\033[0m" process_begin: CreateProcess(NULL, sleep 5, ...) failed. make (e=2): The system cannot find the file specified. make: *** [Makefile:16: install] Error 2 PS C:\Users\Tal\VScode\OpenChat>

Is there any other way to overcome this issue?

Sorry to be a party popper, but as it looks it will affect many.

Maybe you could suggest any other way to install it...

LucianoSP commented 1 year ago

I have the same error. It seems it can´t find the .env file.

LucianoSP commented 1 year ago

image

TiltdImage commented 1 year ago

My guess is that you might not hav all the permissions granted or you don't have Docker install or setup correctly.

I was getting an error as well that looked similar but just a few lines a little further down the install.

The following worked for me, but may not work for you. This took me forever to figure out it seems but after hundreds of forums it felt like. I figured it out myself and all I did was verify that docker was installed, it wasn't (must have deleted cause I hadn't used it in a while) and so I installed it.

After than I then went to Docker's advanced settings (after I purchased the $7/mo subscription, again not sure if that matters) but I made sure to check "allow the default Docker socket to be used" and the "Allow privileged port mapping". I ran all the daemons manually first, but you probably don't have to do that, I am not sure, it was just the process I did after I couldn't get it to work after installing still so i figured I would mention it.

This got me all the way through to the end, but I still got an error of server refused by the connection, but hey at least I got it all the way to install and it is just a connection error. Maybe your connection will be right.

gharbat commented 1 year ago

Hey

I am working on solving this issue and many similar ones that was reported on Windows, I am expecting to ship the update this weekend.

will drop a message once the update is released on our discord server https://discord.gg/yjEgCgvefr :)

JeremiLorenti commented 1 year ago

Hey, I was able to modify the Makefile to work with Windows 11. I basically removed the "sleep" commands, comments, and changed the cp copy lines to

copy /Y backend-server\.env.example backend-server\.env
copy /Y common.env llm-server\.env"

DOCKER_COMPOSE = docker-compose
BUILD_OPTS = 

install:
    @echo "=== Putting the services down (if already running) ==="
    ${DOCKER_COMPOSE} down --remove-orphans

    @echo "=== Setting up Docker environment ==="
    @echo "=== This will overwrite your .env files, you still have some time to abort ==="
    @echo "=== Copying .env files ==="
    copy /Y backend-server\.env.example backend-server\.env
    copy /Y common.env llm-server\.env
    ${DOCKER_COMPOSE} build ${BUILD_OPTS}
    ${DOCKER_COMPOSE} up -d 
    @echo "=== Waiting for services to start (~20 seconds) ==="

    @echo "=== Clearing backend server config cache ==="
    ${DOCKER_COMPOSE} exec backend-server php artisan config:cache

    @echo "=== Run backend server server migrations ==="
    ${DOCKER_COMPOSE} exec backend-server php artisan migrate --seed
    ${DOCKER_COMPOSE} exec backend-server php artisan storage:link
    ${DOCKER_COMPOSE} run -d backend-server php artisan queue:work --timeout=200

    @echo "=== Installation completed ==="
    @echo "=== 🔥🔥 You can now access the dashboard at -> http://localhost:8000 ==="
    @echo "=== Enjoy! ==="

run-worker:
    ${DOCKER_COMPOSE} exec backend-server php artisan queue:work --timeout=200

db-setup:
    ${DOCKER_COMPOSE} exec backend-server php artisan migrate:fresh --seed

down:
    ${DOCKER_COMPOSE} down --remove-orphans

exec-backend-server:
    ${DOCKER_COMPOSE} exec backend-server bash
.PHONY: install down
gharbat commented 1 year ago

Introduced windows support in https://github.com/openchatai/OpenChat/releases/tag/0.3.0 if you have any other issues, please feel free to open a new issue :)