comet-ml / opik

Open-source end-to-end LLM Development Platform
Apache License 2.0
1.36k stars 73 forks source link

[Bug]: Failed to install Opik on MacOS #235

Closed AbhiPawar5 closed 2 weeks ago

AbhiPawar5 commented 2 weeks ago

Willingness to contribute

No. I can't contribute a fix for this bug at this time.

What component(s) are affected?

Opik version

Describe the problem

Failed to install Opik via Miniconda over MacBook Pro M3 Error log:

Playbill Version: 0.4.0
Debug mode is enabled.
Installation requires root permissions.
Please provide your sudo/administrator password: 

[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'

PLAY [Playbook Install Opik] ***************************************************

TASK [Gathering Facts] *********************************************************
ok: [127.0.0.1]

TASK [comet-minikube : Install Docker + Minikube on debian] ********************
skipping: [127.0.0.1]

TASK [comet-minikube : Install Docker + Minikube on macOS] *********************
included: /opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/ansible/roles/comet-minikube/tasks/darwin.yml for 127.0.0.1

TASK [comet-minikube : Ensure Homebrew is installed] ***************************
ok: [127.0.0.1]

TASK [comet-minikube : Update Homebrew repository] *****************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "cmd": "brew update", "msg": "[Errno 2] No such file or directory: b'brew'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=3    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   

Unexpected Error: Ansible playbook fail
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/__init__.py", line 521, in main
    opik_server(prog_name=__package__)  # pylint: disable=no-value-for-parameter # noqa: E501
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/__init__.py", line 140, in decorator
    closure: None = ctx.invoke(func, *args, **kwargs)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/__init__.py", line 394, in install
    run_external_subroutine(
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/__init__.py", line 73, in run_external_subroutine
    func(*args)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/__init__.py", line 391, in run_all
    raise ex
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/opik_installer/__init__.py", line 373, in run_all
    AnsibleRunner(
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/ansible_playbill/__init__.py", line 209, in run_all
    self.run(playbook, collate_playbook_config=False)
  File "/opt/miniconda3/envs/bedrock_v2/lib/python3.9/site-packages/ansible_playbill/__init__.py", line 193, in run
    raise AnsibleRunnerException("Ansible playbook fail")

Reproduction steps

opik-server --debug install
CRThaze commented 2 weeks ago

@AbhiPawar5 Hi there. So from examining the output it seems that you already have homebrew installed, but that it is not in your shell's PATH.

If you run brew in your shell do you get an error? The fact that the installer found it installed but not in the PATH suggests it's not correctly setup.

The installer assumed that if it was installed we could invoke it. But I think we could make this better by not relying on the PATH and simply invoking the command directly. However Homebrew relies on a few other things to be setup in addition to putting it in the PATH, so we'd have to test to if that's sufficient.

AbhiPawar5 commented 2 weeks ago

Hi @CRThaze, thanks for pointing this out! Adding the Homebrew path solved this for me.