代码拉取完成,页面将自动刷新
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
ARG BASE=openeuler/python:3.11.13-oe2403lts
ARG VERSION=v1.2
# Stage 1: base setup used by other stages
FROM $BASE AS base
# get security updates
RUN yum update -y && \
yum install -y \
shadow && \
yum clean all && \
rm -rf /var/cache/yum
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
ARG VERSION
RUN yum update -y && \
yum install -y git && \
yum clean all && \
rm -rf /var/cache/yum
ARG GENAICOMPS_REPO=https://github.com/opea-project/GenAIComps.git
RUN git clone -b $VERSION $GENAICOMPS_REPO
ARG GENAIEXAMPLES_REPO=https://github.com/opea-project/GenAIExamples.git
RUN git clone -b $VERSION $GENAIEXAMPLES_REPO
# 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/
COPY --from=git $HOME/GenAIExamples/SearchQnA/searchqna.py $HOME/searchqna.py
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/GenAIComps
USER user
ENTRYPOINT ["python", "searchqna.py"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。