severian42 / GraphRAG-Local-UI

GraphRAG using Local LLMs - Features robust API and multiple apps for Indexing/Prompt Tuning/Query/Chat/Visualizing/Etc. This is meant to be the ultimate GraphRAG/KG local LLM app.
MIT License
1.52k stars 175 forks source link

[Feature Request] Docker image #7

Open virdb opened 2 months ago

virdb commented 2 months ago

There are any chance to have a docker image available?

Best regards,

wwjCMP commented 2 months ago

it is very convenient to deploy via docker

severian42 commented 2 months ago

Great idea! I added it to the list. Hopefully will have the major update soon with the new Dockerfile

yakeworld commented 1 month ago

DOCKER

# Use Python 3.11 as the base image
FROM python:3.11

# Set working directory
WORKDIR /work

# Set pip to use Tsinghua mirror
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

# Upgrade pip
RUN pip install --upgrade pip

# Install git
RUN apt-get update && apt-get install -y git

# Clone the repository
RUN git clone https://github.com/severian42/GraphRAG-Local-UI.git

# Set working directory to the cloned repo
WORKDIR /work/GraphRAG-Local-UI

# Install requirements
RUN pip install -r requirements.txt

# Expose port 7860
EXPOSE 7860

# Command to run the application
CMD ["python", "app.py"]

docker run -it -d --name graphrag -p 7860:7860 --net nlink --ip 172.18.0.202 -v /markdown:/work grahrag bash

Issue: When executing inside the Docker container:

docker exec -it graphrag bash
wget http://127.0.0.1:7860

The service is accessible.

However, when trying:

wget http://172.18.0.202:7860 

The service is not accessible.

Furthermore, when accessing from outside the container:

wget http://127.0.0.1:7860 

The service is not accessible.

This suggests that the service is only bound to localhost within the container and is not properly exposed or accessible from outside the container or on other network interfaces.

severian42 commented 1 month ago

Great work! Have you tried setting the 7680 host to `http://host.docker.internal'? Sometimes you will need to change it to that rather than the usual 0.0.0.0 or 127.0.0.1 to access the container. If that doesn't work, the issue is probably in the Gradio launch logic. I am working on refining everything and making it more Docker-friendly at the moment. Let me know if you find a solve to your issue! I'll try to see what I can on my end