Skip to content

Commit

Permalink
Update trace instrument command (#272)
Browse files Browse the repository at this point in the history
* Fix ui bug

* Fix arms package link error

* Fix bug

* Fix exclude key

* Remove row_number

* Fix template error

* Fix dockerfile
  • Loading branch information
moria97 authored Nov 15, 2024
1 parent 843366f commit 1e626f9
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
WORKDIR /app
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY . .
CMD ["pai_rag", "serve"]
CMD ["ENABLE_FASTAPI=false", "ENABLE_REQUESTS=false", "ENABLE_AIOHTTPCLIENT=false", "aliyun-instrument", "python" , "src/pai_rag/main.py"]
2 changes: 1 addition & 1 deletion Dockerfile_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ RUN apt-get update && apt-get install -y libgl1 libglib2.0-0
WORKDIR /app
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY . .
CMD ["pai_rag", "serve"]
CMD ["ENABLE_FASTAPI=false", "ENABLE_REQUESTS=false", "ENABLE_AIOHTTPCLIENT=false", "aliyun-instrument", "python" , "src/pai_rag/main.py"]
3 changes: 0 additions & 3 deletions Dockerfile_ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ WORKDIR /app
COPY . .

RUN poetry install && rm -rf $POETRY_CACHE_DIR
ENV PYTHON_AGENT_PATH="https://python-agent.oss-rg-china-mainland.aliyuncs.com/1.1.0.rc/aliyun-python-agent.tar.gz"
RUN poetry run aliyun-bootstrap -a install

FROM python:3.11-slim AS prod

RUN rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Harbin /etc/localtime
Expand Down
5 changes: 0 additions & 5 deletions src/pai_rag/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import os
os.environ["ENABLE_FASTAPI"] = "false"
os.environ["ENABLE_REQUESTS"] = "false"
os.environ["ENABLE_AIOHTTPCLIENT"] = "false"
from aliyun.opentelemetry.instrumentation.auto_instrumentation import sitecustomize # ByPass unused import: use for arms trace initialization

import click
import uvicorn
from fastapi import FastAPI
Expand Down

0 comments on commit 1e626f9

Please sign in to comment.