From 79847b4c924645aae8b385c5ded242c583317177 Mon Sep 17 00:00:00 2001 From: zhihang Date: Sat, 26 Jul 2025 03:47:38 +0000 Subject: [PATCH] update DBQnA Signed-off-by: zhihang --- AI/opea/text2sql-ui/1.2/24.03-lts/Dockerfile | 24 ++++++++++++-------- AI/opea/text2sql/1.2/24.03-lts/Dockerfile | 19 +++++++++++----- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/AI/opea/text2sql-ui/1.2/24.03-lts/Dockerfile b/AI/opea/text2sql-ui/1.2/24.03-lts/Dockerfile index dbb8f529..83da9033 100644 --- a/AI/opea/text2sql-ui/1.2/24.03-lts/Dockerfile +++ b/AI/opea/text2sql-ui/1.2/24.03-lts/Dockerfile @@ -1,20 +1,24 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +ARG BASE=openeuler/node:20.11.1-oe2403lts +ARG VERSION=v1.2 # Stage 1: Build the React application using Node.js # Use Node 20.11.1 as the base image for the build step -FROM openeuler/openeuler:24.03-lts +FROM $BASE AS vite-app -WORKDIR /usr/app/react +ARG VERSION RUN yum update -y && \ - yum install -y \ - npm nginx \ - git + yum install -y git && \ + yum clean all && \ + rm -rf /var/cache/yum -RUN git clone -b v1.2 https://github.com/opea-project/GenAIExamples.git +WORKDIR /usr/app -RUN cp -r GenAIExamples/DBQnA/ui/react/* /usr/app/react && \ +ARG GENAIEXAMPLES_REPO=https://github.com/opea-project/GenAIExamples.git +RUN git clone -b $VERSION $GENAIEXAMPLES_REPO && \ + cp -r GenAIExamples/DBQnA/ui/react /usr/app/react && \ rm -rf GenAIExamples WORKDIR /usr/app/react @@ -22,9 +26,11 @@ WORKDIR /usr/app/react RUN ["npm", "install"] RUN ["npm", "run", "build"] +FROM openeuler/nginx:1.27.2-oe2403lts + EXPOSE 80 -RUN cp -r /usr/app/react/dist/* /usr/share/nginx/html && \ - cp -r /usr/app/react/nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html +COPY --from=vite-app /usr/app/react/nginx.conf /etc/nginx/conf.d/default.conf ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/AI/opea/text2sql/1.2/24.03-lts/Dockerfile b/AI/opea/text2sql/1.2/24.03-lts/Dockerfile index ecee6a2a..3898561d 100644 --- a/AI/opea/text2sql/1.2/24.03-lts/Dockerfile +++ b/AI/opea/text2sql/1.2/24.03-lts/Dockerfile @@ -1,18 +1,25 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -FROM openeuler/openeuler:24.03-lts +ARG BASE=openeuler/python:3.11.13-oe2403lts +ARG VERSION=v1.2 + +FROM $BASE + +ARG VERSION ENV LANG=C.UTF-8 ARG ARCH=cpu RUN yum update -y && \ yum install -y \ + shadow \ gcc gcc-c++ make cmake \ mesa-libGL \ jemalloc-devel \ - python python-pip \ - git + git && \ + yum clean all && \ + rm -rf /var/cache/yum RUN useradd -m -s /bin/bash user && \ mkdir -p /home/user && \ @@ -22,9 +29,9 @@ USER user WORKDIR /home/user -RUN git clone -b v1.2 https://github.com/opea-project/GenAIComps.git - -RUN cp -r GenAIComps/comps /home/user/comps && \ +ARG GENAICOMPS_REPO=https://github.com/opea-project/GenAIComps.git +RUN git clone -b $VERSION $GENAICOMPS_REPO && \ + cp -r GenAIComps/comps /home/user/comps && \ rm -rf GenAIComps RUN pip install --no-cache-dir --upgrade pip setuptools && \ -- Gitee