From d4a9313c799043546ea1c950e4563502e5084083 Mon Sep 17 00:00:00 2001 From: zhihang Date: Sun, 3 Nov 2024 10:10:34 +0000 Subject: [PATCH 1/3] update chatqna-ui/1.0/24.03-lts/Dockerfile. Signed-off-by: zhihang --- chatqna-ui/1.0/24.03-lts/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chatqna-ui/1.0/24.03-lts/Dockerfile b/chatqna-ui/1.0/24.03-lts/Dockerfile index 5acac708..0785b1d4 100644 --- a/chatqna-ui/1.0/24.03-lts/Dockerfile +++ b/chatqna-ui/1.0/24.03-lts/Dockerfile @@ -8,8 +8,7 @@ FROM openeuler/openeuler:24.03-lts RUN yum update -y && \ yum install -y --setopt=install_weak_deps=False \ git \ - npm \ - git + npm WORKDIR /home/user -- Gitee From bb2ea14fc7b89a600520cd585c055bf779cd9ffd Mon Sep 17 00:00:00 2001 From: openeuler Cloud User Date: Sun, 3 Nov 2024 11:15:04 +0000 Subject: [PATCH 2/3] feat: add some components for OPEA --- faqgen-ui/1.0/24.03-lts/Dockerfile | 28 ++++++++++++++ faqgen-ui/meta.yml | 3 ++ faqgen/1.0/24.03-lts/Dockerfile | 38 +++++++++++++++++++ faqgen/meta.yml | 3 ++ .../0.3.7/24.03-lts/Dockerfile | 32 ++++++++++++++++ llm-faqgen-tgi-langchain/meta.yml | 3 ++ 6 files changed, 107 insertions(+) create mode 100644 faqgen-ui/1.0/24.03-lts/Dockerfile create mode 100644 faqgen-ui/meta.yml create mode 100644 faqgen/1.0/24.03-lts/Dockerfile create mode 100644 faqgen/meta.yml create mode 100644 llm-faqgen-tgi-langchain/0.3.7/24.03-lts/Dockerfile create mode 100644 llm-faqgen-tgi-langchain/meta.yml diff --git a/faqgen-ui/1.0/24.03-lts/Dockerfile b/faqgen-ui/1.0/24.03-lts/Dockerfile new file mode 100644 index 00000000..57f3fbde --- /dev/null +++ b/faqgen-ui/1.0/24.03-lts/Dockerfile @@ -0,0 +1,28 @@ +# 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 + +# Update package manager and install Git +RUN yum update -y && yum install -y git npm + +WORKDIR /home/user + +# Copy the front-end code repository +RUN git clone https://gitee.com/zhihang161013/GenAIExamples.git + +# Set the working directory +WORKDIR /home/user/GenAIExamples/FaqGen/ui/svelte + +# Install front-end dependencies +RUN npm install + +# Build the front-end application +RUN npm run build + +# Expose the port of the front-end application +EXPOSE 5173 + +# Run the front-end application in preview mode +CMD ["npm", "run", "preview", "--", "--port", "5173", "--host", "0.0.0.0"] \ No newline at end of file diff --git a/faqgen-ui/meta.yml b/faqgen-ui/meta.yml new file mode 100644 index 00000000..a9ddecf5 --- /dev/null +++ b/faqgen-ui/meta.yml @@ -0,0 +1,3 @@ +1.0-oe2403lts: + path: faqgen-ui/1.0/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file diff --git a/faqgen/1.0/24.03-lts/Dockerfile b/faqgen/1.0/24.03-lts/Dockerfile new file mode 100644 index 00000000..cce090f5 --- /dev/null +++ b/faqgen/1.0/24.03-lts/Dockerfile @@ -0,0 +1,38 @@ + + +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +FROM openeuler/openeuler:24.03-lts + + +RUN yum update -y && yum install -y --setopt=install_weak_deps=False \ + python-pip python \ + shadow-utils \ + mesa-libGL \ + jemalloc-devel \ + git + +RUN useradd -m -s /bin/bash user && \ + mkdir -p /home/user && \ + chown -R user /home/user/ + +WORKDIR /home/user/ +RUN git clone https://gitee.com/zhihang161013/GenAIComps.git + +WORKDIR /home/user/GenAIComps +RUN pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt + +WORKDIR /home/user/ +RUN git clone https://gitee.com/zhihang161013/GenAIExamples.git +RUN cp GenAIExamples/FaqGen/faqgen.py . +RUN rm -rf GenAIExamples + +ENV PYTHONPATH=$PYTHONPATH:/home/user/GenAIComps + +USER user + +WORKDIR /home/user + +ENTRYPOINT ["python", "faqgen.py"] diff --git a/faqgen/meta.yml b/faqgen/meta.yml new file mode 100644 index 00000000..385daeb3 --- /dev/null +++ b/faqgen/meta.yml @@ -0,0 +1,3 @@ +1.0-oe2403lts: + path: faqgen/1.0/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file diff --git a/llm-faqgen-tgi-langchain/0.3.7/24.03-lts/Dockerfile b/llm-faqgen-tgi-langchain/0.3.7/24.03-lts/Dockerfile new file mode 100644 index 00000000..51f86ec1 --- /dev/null +++ b/llm-faqgen-tgi-langchain/0.3.7/24.03-lts/Dockerfile @@ -0,0 +1,32 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +FROM openeuler/openeuler:24.03-lts + +RUN yum update -y && yum install -y --setopt=install_weak_deps=False \ + python-pip python \ + shadow-utils \ + mesa-libGL \ + jemalloc-devel \ + git + +RUN useradd -m -s /bin/bash user && \ + mkdir -p /home/user && \ + chown -R user /home/user/ + +USER user + +WORKDIR /home/user/ + +RUN git clone https://gitee.com/zhihang161013/GenAIComps.git && \ + cp -r GenAIComps/comps . && \ + rm -rf GenAIComps + +RUN pip install --no-cache-dir --upgrade pip setuptools && \ + pip install --no-cache-dir -r /home/user/comps/llms/faq-generation/tgi/langchain/requirements.txt + +ENV PYTHONPATH=$PYTHONPATH:/home/user + +WORKDIR /home/user/comps/llms/faq-generation/tgi/langchain + +ENTRYPOINT ["bash", "entrypoint.sh"] diff --git a/llm-faqgen-tgi-langchain/meta.yml b/llm-faqgen-tgi-langchain/meta.yml new file mode 100644 index 00000000..a79eb6c9 --- /dev/null +++ b/llm-faqgen-tgi-langchain/meta.yml @@ -0,0 +1,3 @@ +0.3.7-oe2403lts: + path: llm-faqgen-tgi-langchain/0.3.7/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file -- Gitee From eb44d49165638d97457445b3a947a7576e6049a4 Mon Sep 17 00:00:00 2001 From: zhihang Date: Mon, 4 Nov 2024 02:28:10 +0000 Subject: [PATCH 3/3] fix: execute git config -- Gitee