You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "afterimagex (via GitHub)" <gi...@apache.org> on 2025/03/06 11:49:09 UTC

[PR] Docker [incubator-hugegraph-ai]

afterimagex opened a new pull request, #195:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/195

   add dockerfile
   add helm charts


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] feat(llm): support Docker & K8s deployment way [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #195:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/195


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Docker [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #195:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/195#discussion_r1984511636


##########
charts/hg-llm/values.yaml:
##########
@@ -0,0 +1,125 @@
+# Default values for hg-llm.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
+replicaCount: 1
+
+# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
+image:
+  repository: 10.41.58.81/kgs_bd/hugegraph-llm

Review Comment:
   ```suggestion
     repository: hugegraph/llm
   ```



##########
scripts/build_llm_image.sh:
##########
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+tag="v0.0.1"
+
+script_dir=$(realpath "$(dirname "$0")")
+
+cd "${script_dir}/../docker"
+
+name="iregistry.baidu-int.com/hugegraph-vermeer/hugegraph-llm:${tag}"
+
+docker build -f Dockerfile.llm -t ${name} ..

Review Comment:
   ```suggestion
   docker build -f Dockerfile.llm -t ${name} ..
   
   ```



##########
docker/docker-compose-llm.yml:
##########
@@ -0,0 +1,10 @@
+version: '3'
+services:
+  hugegraph-llm:
+    build:
+      context: ..
+      dockerfile: ./docker/Dockerfile.llm
+  container_name: hugegraph-llm-rag
+  restart: always
+  ports:
+    - "8080:8080"

Review Comment:
   ```suggestion
       - "8080:8080"
   
   ```



##########
charts/hg-llm/templates/service.yaml:
##########
@@ -0,0 +1,18 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "hg-llm.fullname" . }}
+  labels:
+    {{- include "hg-llm.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.service.type }}
+  externalTrafficPolicy: Cluster
+  internalTrafficPolicy: Cluster
+  ports:
+    - port: {{ .Values.service.port }}
+      targetPort: {{ .Values.service.targetPort }}
+      nodePort: {{ .Values.service.nodePort }}
+      protocol: TCP
+      name: http
+  selector:
+    {{- include "hg-llm.selectorLabels" . | nindent 4 }}

Review Comment:
   ```suggestion
       {{- include "hg-llm.selectorLabels" . | nindent 4 }}
       
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Docker [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #195:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/195#discussion_r1984510415


##########
docker/Dockerfile.llm:
##########
@@ -0,0 +1,19 @@
+FROM python:3.10.16-bookworm
+
+RUN pip install --no-cache-dir poetry
+
+WORKDIR /home/work/
+
+COPY --chown=work:work hugegraph-python-client/ ./hugegraph-python-client/
+COPY --chown=work:work hugegraph-llm/ ./hugegraph-llm/
+
+RUN cd /home/work/hugegraph-llm && \
+    poetry config virtualenvs.in-project true && \
+    poetry lock && \
+    poetry install --no-interaction --no-ansi --verbose
+
+ENV PATH="/home/work/hugegraph-llm/.venv/bin:$PATH"
+
+WORKDIR /home/work/hugegraph-llm
+
+CMD [ "python", "-m", "hugegraph_llm.demo.rag_demo.app", "--port", "8080" ]

Review Comment:
   we also need 2 config files for the container:
   - `.env file` (in hugegraph-llm/.env)
   - `config_prompt.yml` (in `hugegraph-llm/src/hugegraph_llm/resources/demo/config_prompt.yaml`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] feat(llm): support Docker & K8s deployment way [incubator-hugegraph-ai]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #195:
URL: https://github.com/apache/incubator-hugegraph-ai/pull/195#discussion_r1984510415


##########
docker/Dockerfile.llm:
##########
@@ -0,0 +1,19 @@
+FROM python:3.10.16-bookworm
+
+RUN pip install --no-cache-dir poetry
+
+WORKDIR /home/work/
+
+COPY --chown=work:work hugegraph-python-client/ ./hugegraph-python-client/
+COPY --chown=work:work hugegraph-llm/ ./hugegraph-llm/
+
+RUN cd /home/work/hugegraph-llm && \
+    poetry config virtualenvs.in-project true && \
+    poetry lock && \
+    poetry install --no-interaction --no-ansi --verbose
+
+ENV PATH="/home/work/hugegraph-llm/.venv/bin:$PATH"
+
+WORKDIR /home/work/hugegraph-llm
+
+CMD [ "python", "-m", "hugegraph_llm.demo.rag_demo.app", "--port", "8080" ]

Review Comment:
   we also need 2 config files for the container:
   - `.env file` (in hugegraph-llm/.env)
   - `config_prompt.yml` (in `hugegraph-llm/src/hugegraph_llm/resources/demo/config_prompt.yaml`
   
   I'll enhance it in another PR



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org