Skip to content

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

Merged
imbajin merged 4 commits intomainfrom
dockerfile
Mar 10, 2025
Merged

chore(llm): multi-stage building in Dockerfile#199
imbajin merged 4 commits intomainfrom
dockerfile

Conversation

@imbajin
Copy link
Copy Markdown
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
@imbajin imbajin deleted the dockerfile branch March 10, 2025 11:48
imbajin added a commit that referenced this pull request May 21, 2025
…#242)

follow #199 to build a new docker image using
[Nuitka](https://github.com/Nuitka/Nuitka) in Dockerfile.nk

- [x] Only simple tests have been conducted so far
- [ ] more complete tests are still needed


close #200

---------

Co-authored-by: imbajin <jin@apache.org>
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