From d4a9313c799043546ea1c950e4563502e5084083 Mon Sep 17 00:00:00 2001 From: zhihang Date: Sun, 3 Nov 2024 10:10:34 +0000 Subject: [PATCH 1/4] 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 7ec9ea4709da47d8b3e87a56d7900860933ef132 Mon Sep 17 00:00:00 2001 From: zhihang Date: Mon, 4 Nov 2024 02:44:52 +0000 Subject: [PATCH 2/4] feat: add some components for OPEA FaqGen --- 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 414526f8876ebbdb3a01ed360afcacb37d554613 Mon Sep 17 00:00:00 2001 From: zhihang Date: Mon, 4 Nov 2024 12:13:33 +0000 Subject: [PATCH 3/4] update text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile. Signed-off-by: zhihang --- text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile b/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile index c92e3aa4..0cf173b9 100644 --- a/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile +++ b/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile @@ -7,13 +7,12 @@ ENV RUSTC_WRAPPER=/usr/local/bin/sccache RUN yum update -y && \ yum install -y \ --setopt=install_weak_deps=False \ - cargo \ openssl-devel \ gcc \ g++ \ git - RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init && \ +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init && \ chmod +x rustup-init && \ ./rustup-init -y && \ rm rustup-init && \ -- Gitee From 5b176b901b15e4002c50ab09e744cfb11b1a53cb Mon Sep 17 00:00:00 2001 From: zhihang Date: Tue, 5 Nov 2024 01:52:38 +0000 Subject: [PATCH 4/4] update text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile. Signed-off-by: zhihang --- text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile b/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile index 0cf173b9..7fb6efd4 100644 --- a/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile +++ b/text-embeddings-inference-cpu/1.5/24.03-lts/Dockerfile @@ -15,8 +15,9 @@ RUN yum update -y && \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init && \ chmod +x rustup-init && \ ./rustup-init -y && \ - rm rustup-init && \ - source $HOME/.cargo/env + rm rustup-init + +ENV PATH="/root/.cargo/bin:$PATH" # Donwload, configure sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v$SCCACHE/sccache-v$SCCACHE-x86_64-unknown-linux-musl.tar.gz | tar -xzv --strip-components=1 -C /usr/local/bin sccache-v$SCCACHE-x86_64-unknown-linux-musl/sccache && \ -- Gitee