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

chore(llm): multi-stage building in Dockerfile #199

Merged
merged 4 commits into from
Mar 10, 2025
Merged

chore(llm): multi-stage building in Dockerfile #199

merged 4 commits into from
Mar 10, 2025

Conversation

imbajin
Copy link
Member

@imbajin imbajin commented Mar 7, 2025

follow #195

image

After the image uploaded, users could use the following cmd like:

docker run -d --name rag -p 8001:8001 \
  -v /path/to/.env:/home/work/hugegraph-llm/.env \
  -v /path/to/resources:/home/work/hugegraph-llm/src/hugegraph_llm/resources \
  hugegraph/graphrag:1.5.0

or configs in docker-compose.yml

    volumes:
      # Mount local '.env' file, could use ${ENV_FILE_PATH:-/dev/null} to avoid error
      - /path/to/.env:/home/work/hugegraph-llm/.env
      # Mount local resources file
      - /path/to/resources:/home/work/hugegraph-llm/src/hugegraph_llm/resources

or volume/configmap/pvc in k8s

Build/Test the image in root

# Build Image
docker build -f docker/Dockerfile.llm -t graphrag .

# Test/Run container
docker run -it --name rag -p 8001:8001 graphrag  bash

Note

Currently we store the vector data in local by faiss, should replace it as a separate processes/service make rag services stateless)
Or the graph database supports small-scale vector indexing itself

TODO:

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 7, 2025
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 7, 2025
coderzc
coderzc previously approved these changes Mar 7, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 7, 2025
@imbajin imbajin merged commit d02ec96 into main Mar 10, 2025
11 checks passed
@imbajin imbajin deleted the dockerfile branch March 10, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer llm size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants