Skip to content

Docker cannot be deployed #4

@fenglingR

Description

@fenglingR

First of all, I am very grateful to the author for developing this bot.

Next I will describe my problem.

I consulted the tutorial and referenced the deployment case

我的部署命令如下:

docker run --rm -it --name allocator-bot \
  -e HOST_URL=http://localhost:4322 \
  -e APP_API_KEY=my_api_key \
  -e OPENROUTER_API_KEY=my_api_key\
  -e data_folder_path=/data \
  -e S3_ENABLED=false \
  -p 4299:4299 \
  ghcr.io/piiq/allocator-bot:latest

The activation error code is as follows:

Traceback (most recent call last):
  File "/app/.venv/bin/openbb-api", line 4, in <module>
    from openbb_platform_api.main import main
  File "/app/.venv/lib/python3.12/site-packages/openbb_platform_api/main.py", line 48, in <module>
    kwargs = parse_args()
             ^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openbb_platform_api/utils/api.py", line 408, in parse_args
    _kwargs["app"] = import_app(_app_path, _name, _factory)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/openbb_platform_api/utils/api.py", line 341, in import_app
    app = app_or_factory()
          ^^^^^^^^^^^^^^^^
  File "/app/allocator_bot/__main__.py", line 19, in get_app
    from .api import app
  File "/app/allocator_bot/api.py", line 13, in <module>
    from .agent import execution_loop
  File "/app/allocator_bot/agent.py", line 30, in <module>
    from .portfolio import prepare_allocation
  File "/app/allocator_bot/portfolio.py", line 8, in <module>
    from .config import config
  File "/app/allocator_bot/config.py", line 9, in <module>
    config = AppConfig(
             ^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 2 validation errors for AppConfig
agent_host_url
  Value error, agent_host_url environment variable is required. [type=value_error, input_value='', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/value_error
data_folder_path
  Value error, Data folder path must be set when S3 is not enabled. [type=value_error, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.11/v/value_error

The deployment environment is as follows:
OS: debian 12
Docker version 28.3.3, build 980b856

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions