rhohndorf / Auto-Llama-cpp

Uses Auto-GPT with Llama.cpp
MIT License
384 stars 68 forks source link

Running the app in docker but cannot find EMBED_DIM var. #14

Open vishalmish opened 1 year ago

vishalmish commented 1 year ago

Duplicates

Steps to reproduce 🕹

  1. Using ggml-vicuna-13b-4bit.bin model
  2. Changed .env file (From the default)

SMART_LLM_MODEL=./models/ggml-vicuna-13b-4bit.bin FAST_LLM_MODEL=./models/ggml-vicuna-13b-4bit.bin EMBED_DIM = 8192

3. Running `docker build -t foo/auto-llama .` 
4. Running `docker run  -p80:3000 foo/auto-llama`

### Current behavior 😯

docker run -p80:3000 foo/auto-llama Traceback (most recent call last): File "/app/main.py", line 3, in import commands as cmd File "/app/commands.py", line 1, in import browse File "/app/browse.py", line 4, in from llm_utils import create_chat_completion File "/app/llm_utils.py", line 4, in cfg = Config() ^^^^^^^^ File "/app/config.py", line 18, in call cls._instances[cls] = super( ^^^^^^ File "/app/config.py", line 69, in init self.EMBED_DIM = int(os.getenv("EMBED_DIM")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' (base)


### Expected behavior 🤔

Was hoping the app would run after the steps above. 
I'm sure I'm misconfiguring the setup. 

### Your prompt 📝

```yaml
# Paste your prompt here
Vitorhsantos commented 1 year ago

Have you tried to edit the EMBED_DIM in .env config to 5120? Here:

EMBED_DIM = 8192

The ggml-vicuna-13b-4bit.bin model uses this embed dimemsion.

newbie-lad commented 1 year ago

ok, so we miss the com.docker.compose.project.environment_file file label, which should have been set to point to your .env file, but is only set when an explicit --enf-file flag is passed. We need to fix this, or ensure Docker Desktop UI don't need this. This typically will be possible once we implement https://github.com/docker/compose-cli/issues/984

Originally posted by @ndeloof in https://github.com/docker/for-mac/issues/5745#issuecomment-860638751

gpapp commented 1 year ago

Please remove spaces from the .env settings, that is invalid in .bash Should look like this instead EMBED_DIM=8192