ARG VECTARA_AGENT_TYPE ARG VECTARA_AGENT_MAIN_LLM_PROVIDER ARG VECTARA_AGENT_TOOL_LLM_PROVIDER ARG QUERY_EXAMPLES ARG DEMO_NAME ARG SHORT_DESCRIPTION ARG EXTRA_INFO FROM python:3.10 ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" WORKDIR /app COPY --chown=user ./requirements.txt requirements.txt RUN pip3 install --no-cache-dir -r requirements.txt # Use secrets at build time (for other purposes, not for git remotes) RUN --mount=type=secret,id=VECTARA_CUSTOMER_ID,mode=0444,required=true \ --mount=type=secret,id=VECTARA_API_KEY,mode=0444,required=true \ --mount=type=secret,id=VECTARA_CORPUS_ID,mode=0444,required=true \ --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \ echo "VECTARA_CUSTOMER_ID=$(cat /run/secrets/VECTARA_CUSTOMER_ID)" && \ echo "VECTARA_API_KEY=$(cat /run/secrets/VECTARA_API_KEY)" && \ echo "VECTARA_CORPUS_ID=$(cat /run/secrets/VECTARA_CORPUS_ID)" && \ echo "OPENAI_API_KEY=$(cat /run/secrets/OPENAI_API_KEY)" EXPOSE 8000 COPY --chown=user . /app CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]