diff --git a/AI/opea/dataprep-redis/1.2/24.03-lts/Dockerfile b/AI/opea/dataprep-redis/1.2/24.03-lts/Dockerfile index 4d0554243988133f106d61de58786b9dcd5c01ab..86ab4bcb2c1d9a4e998aea18a9eda585117d5a45 100644 --- a/AI/opea/dataprep-redis/1.2/24.03-lts/Dockerfile +++ b/AI/opea/dataprep-redis/1.2/24.03-lts/Dockerfile @@ -1,43 +1,42 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +# Base image FROM openeuler/openeuler:24.03-lts -ENV LANG=C.UTF-8 - -ARG ARCH="cpu" - -RUN yum update -y && yum install -y \ - make gcc gcc-c++ \ - java-11-openjdk \ +#安装python3.11 +RUN yum update -y && \ + yum install -y \ + python3.11 \ + python3-devel \ + python3-pip \ + git \ + wget \ + gcc \ + gcc-c++ \ + java-1.8.0-openjdk \ + cairo \ mesa-libGL \ jemalloc-devel \ + postgresql-devel \ poppler-utils \ - python3-devel python-pip \ tesseract \ - tesseract-langpack-eng \ - libpq-devel \ - cairo \ - wget \ - git \ - xz + curl && \ + ln -s /usr/bin/python3.11 /usr/bin/python && \ + yum clean all -RUN mkdir -p /tmp/LibreOffice/LibreOffice && \ - wget -O /tmp/LibreOffice/LibreOffice.tar.gz https://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/25.2.1/rpm/x86_64/LibreOffice_25.2.1_Linux_x86-64_rpm.tar.gz && \ - tar -zxvf /tmp/LibreOffice/LibreOffice.tar.gz -C /tmp/LibreOffice/LibreOffice/ --strip-components 1 && \ - yum -y install /tmp/LibreOffice/LibreOffice/RPMS/*.rpm && \ - mkdir -p /tmp/LibreOffice/langpack_zh-CN && \ - wget -O /tmp/LibreOffice/langpack_zh-CN.tar.gz https://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/25.2.1/rpm/x86_64/LibreOffice_25.2.1_Linux_x86-64_rpm_langpack_zh-CN.tar.gz && \ - tar -zxvf /tmp/LibreOffice/langpack_zh-CN.tar.gz -C /tmp/LibreOffice/langpack_zh-CN/ --strip-components 1 && \ - yum -y install /tmp/LibreOffice/langpack_zh-CN/RPMS/*.rpm && \ - mkdir -p /tmp/LibreOffice/helppack_zh-CN && \ - wget -O /tmp/LibreOffice/helppack_zh-CN.tar.gz https://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/25.2.1/rpm/x86_64/LibreOffice_25.2.1_Linux_x86-64_rpm_helppack_zh-CN.tar.gz && \ - tar -zxvf /tmp/LibreOffice/helppack_zh-CN.tar.gz -C /tmp/LibreOffice/helppack_zh-CN/ --strip-components 1 && \ - yum -y install /tmp/LibreOffice/helppack_zh-CN/RPMS/*.rpm && \ - rm -rf /tmp/LibreOffice +ENV LANG=C.UTF-8 +ARG ARCH="cpu" + +# Install LibreOffice +RUN wget https://mirrors.bfsu.edu.cn/libreoffice/libreoffice/stable/24.8.6/rpm/x86_64/LibreOffice_24.8.6_Linux_x86-64_rpm.tar.gz && \ + tar -xvf LibreOffice_24.8.6_Linux_x86-64_rpm.tar.gz && \ + yum install -y ./LibreOffice_24.8.6.2_Linux_x86-64_rpm/RPMS/*.rpm && \ + cd / && rm -rf LibreOffice_24.8.6.2_Linux_x86-64_rpm* && rm LibreOffice_24.8.6_Linux_x86-64_rpm.tar.gz # Install ffmpeg static build -RUN cd /root && wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz && \ +RUN yum install -y xz && \ +cd /root && wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz && \ mkdir ffmpeg-git-amd64-static && tar -xvf ffmpeg-git-amd64-static.tar.xz -C ffmpeg-git-amd64-static --strip-components 1 && \ export PATH=/root/ffmpeg-git-amd64-static:$PATH && \ cp /root/ffmpeg-git-amd64-static/ffmpeg /usr/local/bin/ @@ -47,13 +46,9 @@ 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://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout v1.2 - -RUN cp -r GenAIComps/comps . && \ +# COPY comps /home/user/comps +RUN git clone --depth=1 --branch v1.2 https://github.com/opea-project/GenAIComps.git && \ + cp -r GenAIComps/comps /home/user/comps && \ rm -rf GenAIComps RUN pip install --no-cache-dir --upgrade pip setuptools && \ @@ -66,9 +61,7 @@ RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir ${PIP_EXTRA_INDEX_URL} -r /home/user/comps/dataprep/src/requirements.txt && \ pip install opentelemetry-api==1.29.0 opentelemetry-exporter-otlp==1.29.0 opentelemetry-sdk==1.29.0 -ENV PYTHONPATH=$PYTHONPATH:/home/user - -USER root +ENV PYTHONPATH=/usr/bin/python3:/home/user RUN mkdir -p /home/user/comps/dataprep/src/uploaded_files && chown -R user /home/user/comps/dataprep/src/uploaded_files @@ -76,4 +69,4 @@ USER user WORKDIR /home/user/comps/dataprep/src -ENTRYPOINT ["sh", "-c", "python $( [ \"$MULTIMODAL_DATAPREP\" = \"true\" ] && echo 'opea_dataprep_multimodal_microservice.py' || echo 'opea_dataprep_microservice.py')"] \ No newline at end of file +ENTRYPOINT ["sh", "-c", "python $( [ \"$MULTIMODAL_DATAPREP\" = \"true\" ] && echo 'opea_dataprep_multimodal_microservice.py' || echo 'opea_dataprep_microservice.py')"] diff --git a/AI/opea/doc-index-retriever/1.2/24.03-LTS/Dockerfile b/AI/opea/doc-index-retriever/1.2/24.03-LTS/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..78621fc7884d33a721a75c6b43f017c892c6aef0 --- /dev/null +++ b/AI/opea/doc-index-retriever/1.2/24.03-LTS/Dockerfile @@ -0,0 +1,56 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + + +# Stage 1: base setup used by other stages +FROM openeuler/openeuler:24.03-lts AS base + +RUN yum update -y && \ + yum install -y --setopt=install_weak_deps=False \ + python-pip python \ + shadow-utils \ + mesa-libGL \ + jemalloc-devel \ + git + + +ENV HOME=/home/user + +RUN useradd -m -s /bin/bash user && \ + mkdir -p $HOME && \ + chown -R user $HOME + +WORKDIR $HOME + + +# Stage 2: latest GenAIComps sources +FROM base AS git +RUN git clone --depth=1 --branch v1.2 https://github.com/opea-project/GenAIComps.git + +# Stage 3: common layer shared by services using GenAIComps +FROM base AS comps-base + +# copy just relevant parts +COPY --from=git $HOME/GenAIComps/comps $HOME/GenAIComps/comps +COPY --from=git $HOME/GenAIComps/*.* $HOME/GenAIComps/LICENSE $HOME/GenAIComps/ + +WORKDIR $HOME/GenAIComps +RUN pip install --no-cache-dir --upgrade pip setuptools && \ + pip install --no-cache-dir -r $HOME/GenAIComps/requirements.txt +WORKDIR $HOME + +ENV PYTHONPATH=$PYTHONPATH:/home/user/GenAIComps + + +USER user + + +# Stage 4: unique part +FROM comps-base + +RUN git clone --depth=1 --branch v1.2 https://github.com/opea-project/GenAIExamples.git && \ + cp GenAIExamples/DocIndexRetriever/retrieval_tool.py . && \ + rm -rf GenAIExamples + + +ENTRYPOINT ["python", "retrieval_tool.py"] diff --git a/AI/opea/doc-index-retriever/meta.yml b/AI/opea/doc-index-retriever/meta.yml index 4cae4dd4a3ff05f2037aaa54695b1cc970e797f2..8aff098c5afd101c200bfc2fffd2b500f6765787 100644 --- a/AI/opea/doc-index-retriever/meta.yml +++ b/AI/opea/doc-index-retriever/meta.yml @@ -1,3 +1,6 @@ 1.0-oe2403lts: path: 1.0/24.03-lts/Dockerfile + arch: x86_64 +1.2-oe2403lts: + path: 1.2/24.03-lts/Dockerfile arch: x86_64 \ No newline at end of file diff --git a/AI/opea/embedding-tei/1.2/24.03-lts/Dockerfile b/AI/opea/embedding-tei/1.2/24.03-lts/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5038e5c1cf3e93987c2cf95ab04186738fdd5971 --- /dev/null +++ b/AI/opea/embedding-tei/1.2/24.03-lts/Dockerfile @@ -0,0 +1,33 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + + +# Base image +FROM openeuler/openeuler:24.03-lts + +#安装python3.11 +RUN yum update -y && \ + yum install -y \ + python3.11 \ + python3-devel \ + python3-pip \ + git \ + wget && \ + ln -s /usr/bin/python3.11 /usr/bin/python && \ + yum clean all + +RUN git clone --depth=1 --branch v1.2 https://github.com/opea-project/GenAIComps.git && \ + cp -r GenAIComps/comps /home/comps && \ + rm -rf GenAIComps + +RUN pip install --no-cache-dir --upgrade pip setuptools && \ + pip install --no-cache-dir -r /home/comps/embeddings/src/requirements.txt + +ENV PYTHONPATH=/usr/bin/python:/home + +WORKDIR /home/comps/embeddings/src/ + +ENV MULTIMODAL_EMBEDDING="false" + +ENTRYPOINT ["sh", "-c", "python $( [ \"$MULTIMODAL_EMBEDDING\" = \"true\" ] && echo 'opea_multimodal_embedding_microservice.py' || echo 'opea_embedding_microservice.py')"] + diff --git a/AI/opea/embedding-tei/meta.yml b/AI/opea/embedding-tei/meta.yml index 55f9e33c3012e71d7d18b43ba328c1fc4595cd5f..8aff098c5afd101c200bfc2fffd2b500f6765787 100644 --- a/AI/opea/embedding-tei/meta.yml +++ b/AI/opea/embedding-tei/meta.yml @@ -1,3 +1,6 @@ 1.0-oe2403lts: path: 1.0/24.03-lts/Dockerfile arch: x86_64 +1.2-oe2403lts: + path: 1.2/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file diff --git a/AI/opea/reranking-tei/1.2/24.03-lts/Dockerfile b/AI/opea/reranking-tei/1.2/24.03-lts/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..be8e2c48fd1c499d9bbf72f2c1796ce7331776e9 --- /dev/null +++ b/AI/opea/reranking-tei/1.2/24.03-lts/Dockerfile @@ -0,0 +1,56 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + + +# Base image +FROM openeuler/openeuler:24.03-lts +ENV LANG=C.UTF-8 +ARG ARCH="cpu" +ARG SERVICE="all" + +#安装python3.11 +RUN yum update -y && \ + yum install -y \ + python3.11 \ + python3-devel \ + python3-pip \ + git \ + wget \ + libglvnd-glx \ + jemalloc-devel && \ + ln -s /usr/bin/python3.11 /usr/bin/python && \ + yum clean all + +RUN useradd -m -s /bin/bash user && \ + mkdir -p /home/user && \ + chown -R user /home/user/ + +RUN git clone --depth=1 --branch v1.2 https://github.com/opea-project/GenAIComps.git && \ + cp -r GenAIComps/comps /home/user/comps && \ + rm -rf GenAIComps + +USER user + +RUN if [ ${ARCH} = "cpu" ]; then \ + pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu; \ +fi && \ +if [ ${SERVICE} = "videoqna" ]; then \ + pip install --no-cache-dir --upgrade pip setuptools && \ + pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements_videoqna.txt; \ +elif [ ${SERVICE} = "all" ]; then \ + git clone https://github.com/IntelLabs/fastRAG.git /home/user/fastRAG && \ + cd /home/user/fastRAG && \ + pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir . && \ + pip install --no-cache-dir .[intel] && \ + pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements_videoqna.txt; \ +fi && \ +pip install --no-cache-dir --upgrade pip setuptools && \ +pip install --no-cache-dir -r /home/user/comps/rerankings/src/requirements.txt; + + +ENV PYTHONPATH=/usr/bin/python3:/home/user + +WORKDIR /home/user/comps/rerankings/src + +ENTRYPOINT ["python", "opea_reranking_microservice.py"] diff --git a/AI/opea/reranking-tei/meta.yml b/AI/opea/reranking-tei/meta.yml index 55f9e33c3012e71d7d18b43ba328c1fc4595cd5f..8aff098c5afd101c200bfc2fffd2b500f6765787 100644 --- a/AI/opea/reranking-tei/meta.yml +++ b/AI/opea/reranking-tei/meta.yml @@ -1,3 +1,6 @@ 1.0-oe2403lts: path: 1.0/24.03-lts/Dockerfile arch: x86_64 +1.2-oe2403lts: + path: 1.2/24.03-lts/Dockerfile + arch: x86_64 \ No newline at end of file