-
Notifications
You must be signed in to change notification settings - Fork 218
Integrate openeuler images into CI/CD #1842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
66f0f8a
build image for openeuler
chensuyue 96ee194
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8f565c0
Handle the image name check issue in image build yaml
chensuyue 0a60a47
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 335bffe
Support for openEuler (#1813)
zhihangdeng 32c1ce6
build images for openeuler
chensuyue cce2c27
fix the dockerfile hadolint scan issue (#1850)
zhihangdeng 62ce1b4
only trigger the tests related to openEuler
chensuyue 8354ab2
for test
chensuyue e8ad651
Merge branch 'main' into openeuler
chensuyue ba03b41
Fix some bugs in Embedding and Guardrails (#1858)
zhihangdeng 70c99da
Merge branch 'main' into openeuler
chensuyue 0e91ea3
guardrails-openeuler image build
chensuyue 4891711
update conda env activate step
chensuyue a38eb86
use local cache for BRIDGE_TOWER_MODEL
chensuyue c4ef1a1
Revert "use local cache for BRIDGE_TOWER_MODEL"
chensuyue 358f9a4
revert test code
chensuyue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| ignored: | ||
| - DL3033 | ||
| - DL3003 | ||
| - DL3006 | ||
| - DL3007 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Base image for GenAIComps based OPEA Python applications | ||
| # Build: docker build -t opea/comps-base:{version}-openeuler -f Dockerfile.openEuler . | ||
|
|
||
| ARG IMAGE_NAME=openeuler/python | ||
| ARG IMAGE_TAG=3.11.13-oe2403lts | ||
|
|
||
| FROM ${IMAGE_NAME}:${IMAGE_TAG} AS base | ||
|
|
||
| ENV HOME=/home/user | ||
|
|
||
| RUN yum update -y && \ | ||
| yum upgrade -y && \ | ||
| yum install -y shadow && \ | ||
| yum clean all && \ | ||
| rm -rf /var/cache/yum | ||
|
|
||
| RUN useradd -m -s /bin/bash user && \ | ||
| mkdir -p $HOME && \ | ||
| chown -R user $HOME | ||
|
|
||
| WORKDIR $HOME | ||
|
|
||
| COPY *.toml *.py *.txt *.md LICENSE ./ | ||
|
|
||
| ARG uvpip='uv pip install --system --no-cache-dir' | ||
| RUN pip install --no-cache-dir --upgrade pip setuptools uv && \ | ||
| $uvpip -r requirements.txt | ||
|
|
||
| COPY comps/ comps/ | ||
|
|
||
| ENV PYTHONPATH=$PYTHONPATH:$HOME | ||
|
|
||
| USER user | ||
|
|
||
| ENTRYPOINT ["sh", "-c", "set && ls -la"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM openeuler/python:3.11.13-oe2403lts | ||
|
|
||
| ENV LANG=C.UTF-8 | ||
|
|
||
| ARG ARCH="cpu" | ||
|
|
||
| RUN yum update -y && yum install -y \ | ||
| gcc g++ make cmake \ | ||
| java-1.8.0-openjdk \ | ||
| cairo \ | ||
| libxslt \ | ||
| mesa-libGL \ | ||
| jemalloc-devel \ | ||
| mariadb-connector-c-devel-3.3.8 \ | ||
| libpq-devel \ | ||
| poppler-utils \ | ||
| tesseract-tools \ | ||
| ffmpeg \ | ||
| wget curl \ | ||
| shadow && \ | ||
| yum clean all && \ | ||
| rm -rf /var/cache/yum | ||
|
|
||
| ENV TESSDATA_PREFIX=/usr/share/tesseract/tessdata | ||
|
|
||
| RUN LIBREOFFICE_URL=https://mirrors.tuna.tsinghua.edu.cn/libreoffice/libreoffice/stable/25.2.4/rpm/x86_64/LibreOffice_25.2.4_Linux_x86-64_rpm.tar.gz && \ | ||
| wget $LIBREOFFICE_URL -O /tmp/libreOffice.tar.gz && \ | ||
| tar --strip-components=1 -xvf /tmp/libreOffice.tar.gz -C /tmp && \ | ||
| yum install -y /tmp/RPMS/*.rpm && \ | ||
| yum clean all && \ | ||
| rm -fr /tmp/libreOffice.tar.gz /tmp/RPMS && \ | ||
| ln -sf /usr/bin/libreoffice25.2 /usr/bin/libreoffice | ||
|
|
||
| RUN useradd -m -s /bin/bash user && \ | ||
| mkdir -p /home/user && \ | ||
| chown -R user /home/user/ | ||
|
|
||
| COPY comps /home/user/comps | ||
|
|
||
| ARG uvpip='uv pip install --system --no-cache-dir' | ||
| RUN pip install --no-cache-dir --upgrade pip setuptools uv && \ | ||
| if [ ${ARCH} = "cpu" ]; then \ | ||
| $uvpip torch torchvision --index-url https://download.pytorch.org/whl/cpu; \ | ||
| $uvpip -r /home/user/comps/dataprep/src/requirements-cpu.txt; \ | ||
| else \ | ||
| $uvpip -r /home/user/comps/dataprep/src/requirements-gpu.txt; \ | ||
| fi | ||
|
|
||
| ENV PYTHONPATH=$PYTHONPATH:/home/user | ||
|
|
||
| RUN mkdir -p /home/user/comps/dataprep/src/uploaded_files && chown -R user /home/user/comps/dataprep/src/uploaded_files | ||
| RUN mkdir -p /data && chown -R user /data | ||
|
|
||
| USER user | ||
| ENV NLTK_DATA=/home/user/nltk_data | ||
| # air gapped support: predownload all needed nltk data | ||
| RUN mkdir -p /home/user/nltk_data && python -m nltk.downloader -d /home/user/nltk_data punkt_tab averaged_perceptron_tagger_eng stopwords | ||
| # air gapped support: set model cache dir | ||
| ENV HF_HUB_CACHE=/data | ||
|
|
||
| WORKDIR /home/user/comps/dataprep/src | ||
|
|
||
| ENTRYPOINT ["sh", "-c", "python $( [ \"$MULTIMODAL_DATAPREP\" = \"true\" ] && echo 'opea_dataprep_multimodal_microservice.py' || echo 'opea_dataprep_microservice.py')"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM openeuler/python:3.11.13-oe2403lts | ||
|
|
||
| COPY comps /home/comps | ||
|
|
||
| ARG uvpip='uv pip install --system --no-cache-dir' | ||
| RUN pip install --no-cache-dir --upgrade pip setuptools uv && \ | ||
| $uvpip -r /home/comps/embeddings/src/requirements.txt | ||
|
|
||
| ENV PYTHONPATH=$PYTHONPATH:/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')"] | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM openeuler/python:3.11.13-oe2403lts | ||
|
|
||
| ENV LANG=C.UTF-8 | ||
|
|
||
| ARG ARCH="cpu" | ||
|
|
||
| RUN yum update -y && yum install -y \ | ||
| mesa-libGL \ | ||
| jemalloc-devel \ | ||
| shadow && \ | ||
| yum clean all && \ | ||
| rm -rf /var/cache/yum | ||
|
|
||
| RUN useradd -m -s /bin/bash user && \ | ||
| mkdir -p /home/user && \ | ||
| chown -R user /home/user/ | ||
|
|
||
| COPY comps /home/user/comps | ||
|
|
||
| ARG uvpip='uv pip install --system --no-cache-dir' | ||
| RUN pip install --no-cache-dir --upgrade pip setuptools uv && \ | ||
| if [ ${ARCH} = "cpu" ]; then \ | ||
| $uvpip torch --index-url https://download.pytorch.org/whl/cpu; \ | ||
| $uvpip -r /home/user/comps/guardrails/src/guardrails/requirements-cpu.txt; \ | ||
| else \ | ||
| $uvpip -r /home/user/comps/guardrails/src/guardrails/requirements-gpu.txt; \ | ||
| fi | ||
|
|
||
| ENV PYTHONPATH=$PYTHONPATH:/home/user | ||
|
|
||
| USER user | ||
|
|
||
| WORKDIR /home/user/comps/guardrails/src/guardrails/ | ||
|
|
||
| ENTRYPOINT ["python", "opea_guardrails_microservice.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM openeuler/python:3.11.13-oe2403lts | ||
|
|
||
| ENV LANG=C.UTF-8 | ||
|
|
||
| ARG ARCH="cpu" | ||
|
|
||
| RUN yum update -y && yum install -y \ | ||
| git \ | ||
| mesa-libGL \ | ||
| jemalloc-devel \ | ||
| shadow && \ | ||
| yum clean all && \ | ||
| rm -rf /var/cache/yum | ||
|
|
||
| RUN useradd -m -s /bin/bash user && \ | ||
| mkdir -p /home/user && \ | ||
| chown -R user /home/user/ | ||
|
|
||
| COPY comps/rerankings/src/requirements* /home/user/comps/rerankings/src/ | ||
|
|
||
| ARG uvpip='uv pip install --system --no-cache-dir' | ||
| RUN pip install --no-cache-dir --upgrade pip setuptools uv && \ | ||
| if [ ${ARCH} = "cpu" ]; then \ | ||
| $uvpip torch --index-url https://download.pytorch.org/whl/cpu; \ | ||
| $uvpip -r /home/user/comps/rerankings/src/requirements-cpu.txt; \ | ||
| else \ | ||
| $uvpip -r /home/user/comps/rerankings/src/requirements-gpu.txt; \ | ||
| fi | ||
|
|
||
| COPY comps /home/user/comps | ||
| ENV PYTHONPATH=$PYTHONPATH:/home/user | ||
|
|
||
| USER user | ||
|
|
||
| WORKDIR /home/user/comps/rerankings/src | ||
|
|
||
| ENTRYPOINT ["python", "opea_reranking_microservice.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM openeuler/python:3.11.13-oe2403lts | ||
|
|
||
| ARG ARCH="cpu" | ||
|
|
||
| RUN yum update -y && yum install -y \ | ||
| cairo \ | ||
| mesa-libGL \ | ||
| glib2 \ | ||
| jemalloc-devel \ | ||
| mariadb-connector-c-devel-3.3.8 \ | ||
| gcc g++ make cmake \ | ||
| shadow && \ | ||
| yum clean all && \ | ||
| rm -rf /var/cache/yum | ||
|
|
||
| RUN useradd -m -s /bin/bash user && \ | ||
| mkdir -p /home/user && \ | ||
| chown -R user /home/user/ | ||
|
|
||
| COPY comps /home/user/comps | ||
|
|
||
| ARG uvpip='uv pip install --system --no-cache-dir' | ||
| RUN pip install --no-cache-dir --upgrade pip setuptools uv && \ | ||
| if [ ${ARCH} = "cpu" ]; then \ | ||
| $uvpip torch torchvision --index-url https://download.pytorch.org/whl/cpu; \ | ||
| $uvpip -r /home/user/comps/retrievers/src/requirements-cpu.txt; \ | ||
| else \ | ||
| $uvpip -r /home/user/comps/retrievers/src/requirements-gpu.txt; \ | ||
| fi | ||
|
|
||
| ENV PYTHONPATH=$PYTHONPATH:/home/user | ||
|
|
||
| USER user | ||
| ENV NLTK_DATA=/home/user/nltk_data | ||
| # air gapped support: predownload all needed nltk data | ||
| RUN mkdir -p /home/user/nltk_data && python -m nltk.downloader -d /home/user/nltk_data punkt_tab stopwords | ||
|
|
||
| WORKDIR /home/user/comps/retrievers/src | ||
|
|
||
| ENTRYPOINT ["python", "opea_retrievers_microservice.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Copyright (C) 2025 Huawei Technologies Co., Ltd. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
|
|
||
| FROM openeuler/nginx:1.29.0-oe2403lts | ||
|
|
||
| RUN yum update -y && \ | ||
| yum install -y gettext && \ | ||
| yum clean all && \ | ||
| rm -fr /var/cache/yum | ||
|
|
||
| COPY comps/third_parties/nginx/src/nginx.conf.template /etc/nginx/nginx.conf.template | ||
|
|
||
| ENV FRONTEND_SERVICE_IP=localhost | ||
| ENV FRONTEND_SERVICE_PORT=5173 | ||
| ENV BACKEND_SERVICE_NAME=chatqna | ||
| ENV BACKEND_SERVICE_IP=localhost | ||
| ENV BACKEND_SERVICE_PORT=8888 | ||
| ENV DATAPREP_SERVICE_IP=localhost | ||
| ENV DATAPREP_SERVICE_PORT=6007 | ||
|
|
||
| COPY comps/third_parties/nginx/deployment/docker_compose/start-nginx.sh /usr/local/bin/start-nginx.sh | ||
| RUN chmod +x /usr/local/bin/start-nginx.sh | ||
|
|
||
| CMD ["/usr/local/bin/start-nginx.sh"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.