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

WIP: Add dockerfile with dependencies. Display redirection does nto w… #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ormandi
Copy link
Collaborator

@ormandi ormandi commented Jan 27, 2024

…ork yet.

@ormandi
Copy link
Collaborator Author

ormandi commented Jan 27, 2024

Dockerfile is there with (hopefully) all dependencies. It can be built and run from the root of the project by issuing the following command: docker build -t aihub . && docker run aihub This builds the image and attempts to start it. What you should see is as follows:

  • Image should grab all the dependencies.
  • Should try to start the application which is at the moment failing on not being able to connect to the display. This has to be set up and forwarded through docker runtime. The particular error message I see:
Try one of the following resolutions:

 * Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/aihub_app/aihub/aihub_gui.py", line 268, in <module>
    root = tk.Tk()
           ^^^^^^^
  File "/usr/local/lib/python3.11/tkinter/__init__.py", line 2326, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: couldn't connect to display ":0"

Additional observation: The requirement file has to be cleaned up as it contains some Mac specific transitive dependencies that, obviously, do not fly on Linux.

@ormandi
Copy link
Collaborator Author

ormandi commented Jan 27, 2024

@csabakecskemeti
Copy link
Owner

I've made it work
Screenshot 2024-01-28 at 8 50 35 AM

Here are the steps:

  1. brew install xquartz
  2. start xquarz
  3. setting/security enable: Allow connections from network clients
  4. restart xquarz
  5. open xquarz terminal, and /opt/X11/bin/xhost + 127.0.0.1
  6. refer display in docker like this: ENV DISPLAY host.docker.internal:0

Concerns:

  • Connection to local LLM server do not work:
    openai.APIConnectionError: Connection error.
  • UI does not look good
  • A ton of custom steps, not user firendly

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

Successfully merging this pull request may close these issues.

2 participants