Skip to content

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

Open
ormandi wants to merge 2 commits into
mainfrom
threads
Open

WIP: Add dockerfile with dependencies. Display redirection does nto w…#2
ormandi wants to merge 2 commits into
mainfrom
threads

Conversation

@ormandi

@ormandi ormandi commented Jan 27, 2024

Copy link
Copy Markdown
Collaborator

…ork yet.

@ormandi

ormandi commented Jan 27, 2024

Copy link
Copy Markdown
Collaborator Author

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

ormandi commented Jan 27, 2024

Copy link
Copy Markdown
Collaborator Author

@csabakecskemeti

Copy link
Copy Markdown
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