From 162d5019202aab961f3af7c611a375b2cdc89ea7 Mon Sep 17 00:00:00 2001 From: zhihang Date: Fri, 29 Nov 2024 13:48:00 +0000 Subject: [PATCH] feat: add OPEA component chatqna-conversation-ui --- .../1.0/24.03-lts/Dockerfile | 30 +++++++++++++++++++ chatqna-conversation-ui/meta.yml | 3 ++ 2 files changed, 33 insertions(+) create mode 100644 chatqna-conversation-ui/1.0/24.03-lts/Dockerfile create mode 100644 chatqna-conversation-ui/meta.yml diff --git a/chatqna-conversation-ui/1.0/24.03-lts/Dockerfile b/chatqna-conversation-ui/1.0/24.03-lts/Dockerfile new file mode 100644 index 00000000..cfbdb202 --- /dev/null +++ b/chatqna-conversation-ui/1.0/24.03-lts/Dockerfile @@ -0,0 +1,30 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +# Use node 20.11.1 as the base image +FROM openeuler/openeuler:24.03-lts as vite-app + +# Update package manager and install Git +RUN yum update -y && \ + yum install -y --setopt=install_weak_deps=False \ + git \ + npm + +WORKDIR /home/user + +# Copy the front-end code repository +RUN git clone https://github.com/opea-project/GenAIExamples.git && cd GenAIExamples && git checkout v1.0 + +WORKDIR /home/user/GenAIExamples/ChatQnA/ui/react + +RUN ["npm", "install"] +RUN ["npm", "run", "build"] + +FROM openeuler/nginx:1.27.2-oe2403lts + +COPY --from=vite-app /home/user/GenAIExamples/ChatQnA/ui/react/dist /usr/share/nginx/html + +COPY --from=vite-app /home/user/GenAIExamples/ChatQnA/ui/react/env.sh /docker-entrypoint.d/env.sh + +COPY --from=vite-app /home/user/GenAIExamples/ChatQnA/ui/react/nginx.conf /etc/nginx/conf.d/default.conf +RUN chmod +x /docker-entrypoint.d/env.sh \ No newline at end of file diff --git a/chatqna-conversation-ui/meta.yml b/chatqna-conversation-ui/meta.yml new file mode 100644 index 00000000..09e4737b --- /dev/null +++ b/chatqna-conversation-ui/meta.yml @@ -0,0 +1,3 @@ +1.0-oe2403lts: + path: chatqna-conversation-ui/1.0/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file -- Gitee