Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
vishalmish opened this issue Apr 18, 2023 · 3 comments
Open
1 task done

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

vishalmish opened this issue Apr 18, 2023 · 3 comments

Comments

@vishalmish
Copy link

Duplicates

  • I have searched the existing issues

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
  1. Running docker build -t foo/auto-llama .
  2. 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 <module>
    import commands as cmd
  File "/app/commands.py", line 1, in <module>
    import browse
  File "/app/browse.py", line 4, in <module>
    from llm_utils import create_chat_completion
  File "/app/llm_utils.py", line 4, in <module>
    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 📝

# Paste your prompt here
@Vitorhsantos
Copy link

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
Copy link

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 docker/for-mac#5745 (comment)

@gpapp
Copy link

gpapp commented May 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants