From d7f5533ccdb5d12c7b15442950d50580195aecf5 Mon Sep 17 00:00:00 2001 From: youyeon11 Date: Fri, 3 Oct 2025 14:57:49 +0900 Subject: [PATCH 1/5] =?UTF-8?q?refactor:=20=ED=94=84=EB=A1=AC=ED=94=84?= =?UTF-8?q?=ED=8A=B8=20=EC=9D=BC=EB=B6=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/generate_review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/generate_review.py b/deployment/generate_review.py index 0b9d233..e20891b 100644 --- a/deployment/generate_review.py +++ b/deployment/generate_review.py @@ -59,7 +59,7 @@ def send_prompt(): # Gemini에 전달할 프롬프트 구성 prompt = f""" - 당신은 시니어 개발자입니다. 제출된 Pull Request(PR)에 대해 동료 개발자에게 건설적이고 상세한 코드 리뷰를 제공합니다. + 너는 시니어 개발자다. 제출된 Pull Request(PR)에 대해 건설적이고 상세한 코드 리뷰를 제공해주세요. 리뷰는 반드시 '우선순위 레벨(P1~P5)'로 분류해 주세요. [우선순위 정의] From bc908c7572896bc64db0dc9869dbbf814735fe05 Mon Sep 17 00:00:00 2001 From: youyeon11 Date: Fri, 3 Oct 2025 14:58:40 +0900 Subject: [PATCH 2/5] =?UTF-8?q?del:=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C?= =?UTF-8?q?=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C(actuator)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 3 --- requirements.txt | 4 +--- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/main.py b/app/main.py index 19c2ffc..3e852a0 100644 --- a/app/main.py +++ b/app/main.py @@ -2,7 +2,6 @@ from app.core.lifespan import lifespan from app.api.endpoints import predictions from app.core.logging_config import setup_logging -from prometheus_fastapi_instrumentator import Instrumentator setup_logging() app = FastAPI( @@ -12,8 +11,6 @@ lifespan=lifespan ) -instrumentator = Instrumentator().instrument(app) -instrumentator.expose(app, include_in_schema=False, endpoint="/actuator/prometheus") app.include_router(predictions.router, prefix="/api/v1", tags=["Prediction"]) @app.get("/health") diff --git a/requirements.txt b/requirements.txt index e904539..339d3b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,4 @@ Pillow==11.3.0 dotenv openai timm -logging -prometheus-client==0.19.0 -prometheus-fastapi-instrumentator==6.1.0 \ No newline at end of file +logging \ No newline at end of file From fddbd535c2f712387e7c4f60e43a95d3fb8f417e Mon Sep 17 00:00:00 2001 From: youyeon11 Date: Fri, 3 Oct 2025 14:59:59 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20dcgm-exporter=20=EC=BB=A8=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=84=88=20=EC=B6=94=EA=B0=80(GPU=20=EB=A9=94?= =?UTF-8?q?=ED=8A=B8=EB=A6=AD=20=EC=88=98=EC=A7=91)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/docker-compose.monitoring.yml | 24 ++++++++++++++++++++++++ deployment/docker-compose.yml | 10 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/deployment/docker-compose.monitoring.yml b/deployment/docker-compose.monitoring.yml index a26403f..bab2d2b 100644 --- a/deployment/docker-compose.monitoring.yml +++ b/deployment/docker-compose.monitoring.yml @@ -28,6 +28,30 @@ services: networks: - mynetwork + dcgm-exporter: + image: nvcr.io/nvidia/k8s/dcgm-exporter:latest + container_name: dcgm-exporter + ports: + - "9400:9400" + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + environment: + - NVIDIA_VISIBLE_DEVICES=all + - NVIDIA_DRIVER_CAPABILITIES=utility,compute + restart: unless-stopped + networks: + - mynetwork + healthcheck: + test: [ "CMD", "wget", "-qO-", "http://localhost:9400/metrics" ] + interval: 30s + timeout: 5s + retries: 5 + networks: mynetwork: driver: bridge \ No newline at end of file diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index b7d1c2b..cfc631e 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -13,6 +13,8 @@ services: count: 1 capabilities: [gpu] container_name: app-blue + networks: + - mynetwork app-green: image: ${ECR_URI}/dearbelly-cv:latest @@ -27,4 +29,10 @@ services: - driver: nvidia count: 1 capabilities: [ gpu ] - container_name: app-green \ No newline at end of file + container_name: app-green + networks: + - mynetwork + +networks: + mynetwork: + driver: bridge \ No newline at end of file From ec569c410b9e0bc1405933c8a853d2b94ee122eb Mon Sep 17 00:00:00 2001 From: youyeon11 Date: Fri, 3 Oct 2025 15:00:27 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20prometheus=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=88=98=EC=A7=91=20=EB=8C=80=EC=83=81=20dcgm-exporter?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/prometheus.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/deployment/prometheus.yml b/deployment/prometheus.yml index 13bda8f..0bfbefa 100644 --- a/deployment/prometheus.yml +++ b/deployment/prometheus.yml @@ -16,19 +16,15 @@ scrape_configs: honor_timestamps: false scheme: 'http' static_configs: - - targets: ['${REMOTE_HOST}:9090'] + - targets: ['127.0.0.1:9090'] labels: service: 'monitor-1' - job_name: 'node' static_configs: - - targets: ['${REMOTE_HOST}:9090'] - - job_name: 'fastapi-actuator-blue' - metrics_path: '/actuator/prometheus' - scrape_interval: 1m + - targets: ['127.0.0.1:9090'] + - job_name: 'dcgm' + scrape_interval: 15s static_configs: - - targets: [ 'app-blue:8000' ] - - job_name: 'fastapi-actuator-green' - metrics_path: '/actuator/prometheus' - scrape_interval: 1m - static_configs: - - targets: [ 'app-green:8001' ] \ No newline at end of file + - targets: ['dcgm-exporter:9400'] + labels: + exporter: 'dcgm' \ No newline at end of file From 7739b20dfbc9a370ec97d9693707da091dd29e73 Mon Sep 17 00:00:00 2001 From: youyeon11 Date: Fri, 3 Oct 2025 15:11:57 +0900 Subject: [PATCH 5/5] =?UTF-8?q?del:=20healthcheck=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deployment/docker-compose.monitoring.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/deployment/docker-compose.monitoring.yml b/deployment/docker-compose.monitoring.yml index bab2d2b..f54f044 100644 --- a/deployment/docker-compose.monitoring.yml +++ b/deployment/docker-compose.monitoring.yml @@ -46,11 +46,6 @@ services: restart: unless-stopped networks: - mynetwork - healthcheck: - test: [ "CMD", "wget", "-qO-", "http://localhost:9400/metrics" ] - interval: 30s - timeout: 5s - retries: 5 networks: mynetwork: