Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] importing phoenix fails when running inside Docker. #3530

Closed
Verizane opened this issue Jun 17, 2024 · 5 comments · Fixed by #3533
Closed

[BUG] importing phoenix fails when running inside Docker. #3530

Verizane opened this issue Jun 17, 2024 · 5 comments · Fixed by #3533
Assignees
Labels
bug Something isn't working triage issues that need triage

Comments

@Verizane
Copy link

Verizane commented Jun 17, 2024

Describe the bug
import of phoenix inside a dockerfile fails. Stacktrace:

  
File "/usr/src/app/./script.py", line 1, in <module>
    import phoenix as px
  
File "/usr/local/lib/python3.11/site-packages/phoenix/__init__.py", line 12, in <module>
    from .session.session import (
  
File "/usr/local/lib/python3.11/site-packages/phoenix/session/session.py", line 43, in <module>
    from phoenix.server.app import create_app
  
File "/usr/local/lib/python3.11/site-packages/phoenix/server/app.py", line 74, in <module>
    from phoenix.server.api.schema import schema
  
File "/usr/local/lib/python3.11/site-packages/phoenix/server/api/schema.py", line 16, in <module>
    from phoenix.pointcloud.clustering import Hdbscan
  
File "/usr/local/lib/python3.11/site-packages/phoenix/pointcloud/clustering.py", line 6, in <module>
    from hdbscan import HDBSCAN
  
File "/usr/local/lib/python3.11/site-packages/hdbscan/__init__.py", line 1, in <module>
    from .hdbscan_ import HDBSCAN, hdbscan
  
File "/usr/local/lib/python3.11/site-packages/hdbscan/hdbscan_.py", line 20, in <module>
    from ._hdbscan_linkage import (
  
File "hdbscan/_hdbscan_linkage.pyx", line 1, in init hdbscan._hdbscan_linkage

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

To Reproduce
Steps to reproduce the behavior:

  1. Dockerfile:
FROM python:3.11.9-bookworm AS python-build

WORKDIR /usr/src/app

COPY ./requirements.txt ./requirements.txt

RUN pip install --no-cache-dir -r ./requirements.txt

CMD [ "python", "./script.py" ]

requirements.txt:

arize-phoenix

structlog

weaviate-client

python-dotenv

llama-index

llama-index-vector-stores-weaviate

script.py:

import phoenix as px
  1. inside directory from bash shell call:
docker build -t phoenix-test -f ./Dockerfile . && docker run phoenix-test

Expected behavior
Import inside Docker container should run without problems

Environment (please complete the following information):

  • OS: Any Docker instance. Run on both Windows and Debian
@Verizane Verizane added bug Something isn't working triage issues that need triage labels Jun 17, 2024
@github-project-automation github-project-automation bot moved this to 📘 Todo in phoenix Jun 17, 2024
@RogerHYang
Copy link
Contributor

This issue was caused by the release of numpy 2.0, but it looks like it has been fixed upstream. Can you try again?

@RogerHYang RogerHYang self-assigned this Jun 17, 2024
@Verizane
Copy link
Author

Verizane commented Jun 17, 2024

This issue was caused by the release of numpy 2.0, but it looks like it has been fixed upstream. Can you try again?

I have built it from scratch and the error is the same. the numpy version is 2.0.0
hdbscan is at version 0.8.36
arize-phoenix at 4.4.2

@RogerHYang
Copy link
Contributor

ok. looks like this error is from hdbscan. i think we'll have to restrict the numpy version

@RogerHYang
Copy link
Contributor

i filed an issue with hdbscan. I'll add a restriction on phoenix

@Verizane
Copy link
Author

Thank you, with Version 4.4.3 it is solved!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working triage issues that need triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants