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

[Bug] Starting a bash script and doing docker-compose takes forever #2

Closed
HahaBill opened this issue Feb 2, 2025 · 10 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@HahaBill
Copy link

HahaBill commented Feb 2, 2025

Short description of current behavior

I forked and cloned the repo and run this:

chmod +x start.sh
./start.sh

However, it takes longer than expected, as you can see in the screenshot (6131.5 seconds ~ 1.7 hours)

Video or screenshots

Image

Expected behavior

Should be built and ready to run the app

@orhanrauf orhanrauf self-assigned this Feb 3, 2025
@orhanrauf orhanrauf added the bug Something isn't working label Feb 3, 2025
@orhanrauf orhanrauf changed the title [Not sure if a Bug] Starting a bash script and doing docker-compose takes forever [Bug] Starting a bash script and doing docker-compose takes forever Feb 3, 2025
@orhanrauf
Copy link
Contributor

@HahaBill commit ef50991 (latest) contains some changes to the way poetry is fetched and installed. Can you try again, and if facing the same errors still, run docker logs airweave-backend and post that here? Thanks!

@HahaBill
Copy link
Author

HahaBill commented Feb 3, 2025

@HahaBill commit ef50991 (latest) contains some changes to the way poetry is fetched and installed. Can you try again, and if facing the same errors still, run docker logs airweave-backend and post that here? Thanks!

Alright, I will try again soon.

@HahaBill
Copy link
Author

HahaBill commented Feb 3, 2025

Error:

+ '[' '!' -f .env ']'
+ echo 'Generating new encryption key...'
Generating new encryption key...
++ openssl rand -base64 32
+ NEW_KEY=leyuNZOO1QBa+06pPudW6xdx0BG9SZncuSnOvIYi8kY=
+ echo 'Generated key: leyuNZOO1QBa+06pPudW6xdx0BG9SZncuSnOvIYi8kY='
Generated key: leyuNZOO1QBa+06pPudW6xdx0BG9SZncuSnOvIYi8kY=
+ grep -v '^ENCRYPTION_KEY=' .env
+ mv .env.tmp .env
+ echo ENCRYPTION_KEY=leyuNZOO1QBa+06pPudW6xdx0BG9SZncuSnOvIYi8kY=
+ echo 'Updated .env file. Current ENCRYPTION_KEY value:'
Updated .env file. Current ENCRYPTION_KEY value:
+ grep '^ENCRYPTION_KEY=' .env
ENCRYPTION_KEY=leyuNZOO1QBa+06pPudW6xdx0BG9SZncuSnOvIYi8kY=
+ echo 'Starting Docker Compose...'
Starting Docker Compose...
+ docker compose up -d
[+] Running 6/6
 ✔ Container airweave-embeddings  Running                                                                                                                                                                                                  0.0s 
 ✔ Container airweave-redis       Healthy                                                                                                                                                                                                  0.0s 
 ✔ Container airweave-db          Healthy                                                                                                                                                                                                  0.0s 
 ✔ Container airweave-weaviate    Healthy                                                                                                                                                                                                  0.0s 
 ✘ Container airweave-backend     Error                                                                                                                                                                                                    0.6s 
 ✔ Container airweave-frontend    Recreated                                                                                                                                                                                                0.4s 
dependency failed to start: container airweave-backend is unhealthy
(base) billtonhoang@BillTonHoangs-MacBook-Pro airweave % docker logs airweave-backend
Waiting for database...
Skipping virtualenv creation, as specified in config file.
Running database migrations...
Skipping virtualenv creation, as specified in config file.
Traceback (most recent call last):
  File "/usr/local/bin/alembic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 636, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 626, in main
    self.run_cmd(cfg, options)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 603, in run_cmd
    fn(
  File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 406, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 586, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/alembic/env.py", line 30, in <module>
    from app.core.config import settings  # Import settings
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/core/config.py", line 133, in <module>
    settings = Settings()
               ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pydantic_settings/main.py", line 171, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 214, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
OPENAI_API_KEY
  Field required [type=missing, input_value={'PROJECT_NAME': 'Airweav..., 'RUN_DB_SYNC': 'true'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missing
Waiting for database...
Skipping virtualenv creation, as specified in config file.
Running database migrations...
Skipping virtualenv creation, as specified in config file.
Traceback (most recent call last):
  File "/usr/local/bin/alembic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 636, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 626, in main
    self.run_cmd(cfg, options)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 603, in run_cmd
    fn(
  File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 406, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 586, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/alembic/env.py", line 30, in <module>
    from app.core.config import settings  # Import settings
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/core/config.py", line 133, in <module>
    settings = Settings()
               ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pydantic_settings/main.py", line 171, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 214, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
OPENAI_API_KEY
  Field required [type=missing, input_value={'PROJECT_NAME': 'Airweav..., 'RUN_DB_SYNC': 'true'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missing
Waiting for database...
Skipping virtualenv creation, as specified in config file.
Running database migrations...
Skipping virtualenv creation, as specified in config file.
Traceback (most recent call last):
  File "/usr/local/bin/alembic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 636, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 626, in main
    self.run_cmd(cfg, options)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 603, in run_cmd
    fn(
  File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 406, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 586, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/alembic/env.py", line 30, in <module>
    from app.core.config import settings  # Import settings
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/core/config.py", line 133, in <module>
    settings = Settings()
               ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pydantic_settings/main.py", line 171, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 214, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
OPENAI_API_KEY
  Field required [type=missing, input_value={'PROJECT_NAME': 'Airweav..., 'RUN_DB_SYNC': 'true'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missing
Waiting for database...
Skipping virtualenv creation, as specified in config file.
Running database migrations...
Skipping virtualenv creation, as specified in config file.
Traceback (most recent call last):
  File "/usr/local/bin/alembic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 636, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 626, in main
    self.run_cmd(cfg, options)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 603, in run_cmd
    fn(
  File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 406, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 586, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/alembic/env.py", line 30, in <module>
    from app.core.config import settings  # Import settings
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/core/config.py", line 133, in <module>
    settings = Settings()
               ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pydantic_settings/main.py", line 171, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 214, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
OPENAI_API_KEY
  Field required [type=missing, input_value={'PROJECT_NAME': 'Airweav..., 'RUN_DB_SYNC': 'true'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missing
Waiting for database...
Skipping virtualenv creation, as specified in config file.
Running database migrations...
Skipping virtualenv creation, as specified in config file.
Traceback (most recent call last):
  File "/usr/local/bin/alembic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 636, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 626, in main
    self.run_cmd(cfg, options)
  File "/usr/local/lib/python3.11/site-packages/alembic/config.py", line 603, in run_cmd
    fn(
  File "/usr/local/lib/python3.11/site-packages/alembic/command.py", line 406, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.11/site-packages/alembic/script/base.py", line 586, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 95, in load_python_file
    module = load_module_py(module_id, path)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 113, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/app/alembic/env.py", line 30, in <module>
    from app.core.config import settings  # Import settings
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/app/core/config.py", line 133, in <module>
    settings = Settings()
               ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pydantic_settings/main.py", line 171, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 214, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
OPENAI_API_KEY
  Field required [type=missing, input_value={'PROJECT_NAME': 'Airweav..., 'RUN_DB_SYNC': 'true'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missing

@HahaBill
Copy link
Author

HahaBill commented Feb 3, 2025

@orhanrauf It still seems to not be working. It's due to the validation error (pydantic): OPENA_APII_KEY required

@orhanrauf
Copy link
Contributor

9cf92a2 should fix this issue. The OpenAI key is optional in case you want to play around with the data.

@orhanrauf
Copy link
Contributor

@HahaBill let me know if this works for you

@HahaBill
Copy link
Author

HahaBill commented Feb 6, 2025

Image

@HahaBill
Copy link
Author

HahaBill commented Feb 6, 2025

@HahaBill let me know if this works for you

I have updated my fork and run ./start.sh again. The validation errors was resolved but I go another error in airweave-weavite.

@HahaBill
Copy link
Author

HahaBill commented Feb 6, 2025

But I can open and use the UI 👍

@orhanrauf
Copy link
Contributor

OK, closing this. Moved the other issue to #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants