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

Docker support please #4

Open
arsaboo opened this issue Jul 27, 2024 · 19 comments
Open

Docker support please #4

arsaboo opened this issue Jul 27, 2024 · 19 comments

Comments

@arsaboo
Copy link

arsaboo commented Jul 27, 2024

Can you please provide docker support...thanks!

@shaunthecomputerscientist
Copy link
Owner

If you want me to make a package which supports structured data analysis i can do that. Or maybe since there are dependency issues i can dockerize it and make a web app for that like Julius ai. The problem is i am not getting time these days. If anyone wants to work on this with me I'll explain the project.

@qwaszaq
Copy link

qwaszaq commented Aug 6, 2024

be nice to get a docker!

@shaunthecomputerscientist
Copy link
Owner

be nice to get a docker!

I am a little busy right now. Give me some time. I will try to dockerize the app. Or release a package which provides similar functions.

@shaunthecomputerscientist
Copy link
Owner

Can you please provide docker support...thanks!

Added docker support and instructions in readme.

@arsaboo
Copy link
Author

arsaboo commented Aug 21, 2024

I ran it using the following compose file, but it is not working.

services:
  eda_gpt_service:
    image: mrpoldockeroperator123/eda-gpt:v1
    container_name: eda_gpt
    ports:
      - "8502:8501"
    restart: always
    environment:
      - TZ=America/New_York

I see the following error in the docker logs:

Error: Invalid value: File does not exist: home.py
Usage: streamlit run [OPTIONS] TARGET [ARGS]...
Try 'streamlit run --help' for help.

@arsaboo
Copy link
Author

arsaboo commented Aug 21, 2024

Even with docker run -d -p 8501:8501 mrpoldockeroperator123/eda-gpt:v1, I get the same error:

Usage: streamlit run [OPTIONS] TARGET [ARGS]...
Try 'streamlit run --help' for help.
Error: Invalid value: File does not exist: home.py

Looks like the home.py needs to be moved to the right folder @shaunthecomputerscientist

@shaunthecomputerscientist
Copy link
Owner

Even with docker run -d -p 8501:8501 mrpoldockeroperator123/eda-gpt:v1, I get the same error:

Usage: streamlit run [OPTIONS] TARGET [ARGS]...
Try 'streamlit run --help' for help.
Error: Invalid value: File does not exist: home.py

Looks like the home.py needs to be moved to the right folder @shaunthecomputerscientist

Did you download docker desktop?

@shaunthecomputerscientist
Copy link
Owner

I think the problem is related to home.py. The filename is Home.py. It seems to be case-sensitive.

@arsaboo
Copy link
Author

arsaboo commented Aug 21, 2024

Did you download docker desktop?

I tried this on Ubuntu and Mac (where I have docker desktop).

@shaunthecomputerscientist
Copy link
Owner

Did you download docker desktop?

I tried this on Ubuntu and Mac (where I have docker desktop).

Added new version check the docker try to run the container. Version v2.

@arsaboo
Copy link
Author

arsaboo commented Aug 25, 2024

@shaunthecomputerscientist Tried v2, and I can see the UI, but a couple of things:
First, I see this error:

2024-08-25 09:42:35.996 Uncaught app exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
    exec(code, module.__dict__)
  File "/app/pages/EDA_GPT.py", line 3, in <module>
    from pages.src.unstructured_data import unstructured_Analyzer
  File "/app/pages/src/unstructured_data.py", line 4, in <module>
    from .vstore import VectorStore
  File "/app/pages/src/vstore.py", line 15, in <module>
    from unstructured.partition.auto import partition_pdf
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/auto.py", line 83, in <module>
    from unstructured.partition.pdf import partition_pdf
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/pdf.py", line 50, in <module>
    from unstructured.partition.pdf_image.pdf_image_utils import (
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/pdf_image/pdf_image_utils.py", line 13, in <module>
    import cv2
ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

Second, where is the secret.toml file? I did not see any mount path in the docker command.

@shaunthecomputerscientist
Copy link
Owner

@shaunthecomputerscientist Tried v2, and I can see the UI, but a couple of things:
First, I see this error:

2024-08-25 09:42:35.996 Uncaught app exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
    result = func()
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
    exec(code, module.__dict__)
  File "/app/pages/EDA_GPT.py", line 3, in <module>
    from pages.src.unstructured_data import unstructured_Analyzer
  File "/app/pages/src/unstructured_data.py", line 4, in <module>
    from .vstore import VectorStore
  File "/app/pages/src/vstore.py", line 15, in <module>
    from unstructured.partition.auto import partition_pdf
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/auto.py", line 83, in <module>
    from unstructured.partition.pdf import partition_pdf
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/pdf.py", line 50, in <module>
    from unstructured.partition.pdf_image.pdf_image_utils import (
  File "/usr/local/lib/python3.11/site-packages/unstructured/partition/pdf_image/pdf_image_utils.py", line 13, in <module>
    import cv2
ImportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

Second, where is the secret.toml file? I did not see any mount path in the docker command.

Shit again. I shouldn't have used streamlit. I will check it. My exam gets over on 1st. I will be able to work on this from then on. Would you like to help me to make a proper image?

@arsaboo
Copy link
Author

arsaboo commented Aug 25, 2024

I wish I knew. I can test things out, but I don't know how to create an image. I would like to use it with Ollama locally.

Please focus on the exam for now...we can wait until after your exams.

@shaunthecomputerscientist
Copy link
Owner

I wish I knew. I can test things out, but I don't know how to create an image. I would like to use it with Ollama locally.

Please focus on the exam for now...we can wait until after your exams.

Thank you but i will get it fixed in some time. Also when i am checking the image in a container i see that secrets.toml is present. What's the size of this image btw? To confirm.

@arsaboo
Copy link
Author

arsaboo commented Aug 25, 2024

My question is more about how do I edit the secrets.toml. Here's the docker-compose that I am using:

services:
  eda_gpt_service:
    image: mrpoldockeroperator123/eda-gpt:v2
    container_name: eda_gpt
    ports:
      - "8501:8501"
    restart: always
    environment:
      - TZ=America/New_York

@shaunthecomputerscientist
Copy link
Owner

You need to use the terminal in docker and since it's a linux system you need to use bash commands to navigate then see the file then update it.

But the app is throwing error as it starts right?

docker exec -it <container_id_or_name> /bin/bash

You can access container shell like this.

Then move to secrets.toml step by step.

@arsaboo
Copy link
Author

arsaboo commented Aug 25, 2024

The container starts....I am seeing that error here:
image

BTW, I was able to use the shell to access the secrets.toml (we may want to move things to env, as is typically the case). I don't see any setting for Ollama there.

@shaunthecomputerscientist
Copy link
Owner

The container starts....I am seeing that error here:
image

BTW, I was able to use the shell to access the secrets.toml (we may want to move things to env, as is typically the case). I don't see any setting for Ollama there.

I will get back to this in a week. I did not the containers myself. I delete it since i have less space. I will test it out and update documentation.

@ShahzaibAnwar
Copy link

The container starts....I am seeing that error here:
image
BTW, I was able to use the shell to access the secrets.toml (we may want to move things to env, as is typically the case). I don't see any setting for Ollama there.

I will get back to this in a week. I did not the containers myself. I delete it since i have less space. I will test it out and update documentation.

Hi, Any update as i am facing the same issue,

Screenshot 2024-10-10 171117

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

No branches or pull requests

4 participants