Skip to content

DEPLOY - v1.0.2.2#34

Merged
youyeon11 merged 6 commits intomainfrom
develop
Oct 3, 2025
Merged

DEPLOY - v1.0.2.2#34
youyeon11 merged 6 commits intomainfrom
develop

Conversation

@youyeon11
Copy link
Contributor

πŸ“Œ μž‘μ—… λͺ©μ 


@youyeon11 youyeon11 merged commit 1e76a39 into main Oct 3, 2025
1 check failed
@gemini-code-assist
Copy link

Summary of Changes

Hello @youyeon11, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a significant update to the project's monitoring stack, shifting from direct FastAPI application instrumentation to a more specialized GPU monitoring solution. The core changes involve removing the prometheus-fastapi-instrumentator library and its associated Prometheus scrape jobs, and in its place, integrating the NVIDIA DCGM Exporter for detailed GPU metric collection. This refactor is complemented by necessary Docker Compose network configurations to ensure seamless operation of the new monitoring components and updated Prometheus settings to correctly ingest the new GPU metrics.

Highlights

  • Monitoring Refactor: Removed prometheus-fastapi-instrumentator from the FastAPI application, streamlining the application's dependencies and reducing its direct responsibility for metrics exposure.
  • GPU Monitoring Integration: Introduced dcgm-exporter into the docker-compose.monitoring.yml to enable comprehensive GPU performance monitoring, including resource reservations and capabilities for NVIDIA GPUs.
  • Prometheus Configuration Update: Modified prometheus.yml to remove the old FastAPI-specific scrape jobs and added a new job to scrape metrics from the dcgm-exporter service, centralizing GPU metric collection.
  • Docker Network Alignment: Updated docker-compose.yml to ensure both app-blue and app-green services are connected to the mynetwork, facilitating inter-service communication and integration with the new monitoring components.
  • Minor Prompt Adjustment: A small change in deployment/generate_review.py to adjust the tone of the Korean prompt for the AI review generation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with πŸ‘ and πŸ‘Ž on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ 레벨의 Prometheus λͺ¨λ‹ˆν„°λ§μ„ μ œκ±°ν•˜κ³ , dcgm-exporterλ₯Ό λ„μž…ν•˜μ—¬ GPU λ©”νŠΈλ¦­ λͺ¨λ‹ˆν„°λ§μœΌλ‘œ μ „ν™˜ν•˜λŠ” 것을 λͺ©ν‘œλ‘œ ν•˜λŠ” κ²ƒμœΌλ‘œ λ³΄μž…λ‹ˆλ‹€. κ΄€λ ¨ν•˜μ—¬ docker-compose.yml, prometheus.yml, requirements.txt νŒŒμΌλ“€μ΄ 일관성 있게 μˆ˜μ •λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ „λ°˜μ μΈ λ³€κ²½ λ°©ν–₯은 λͺ…ν™•ν•˜μ§€λ§Œ, λͺ‡ κ°€μ§€ κ°œμ„ μ μ„ μ œμ•ˆν•©λ‹ˆλ‹€. Docker 이미지에 latest νƒœκ·Έλ₯Ό μ‚¬μš©ν•˜λŠ” λΆ€λΆ„κ³Ό requirements.txt에 λΆˆν•„μš”ν•œ logging νŒ¨ν‚€μ§€κ°€ ν¬ν•¨λœ 점은 잠재적인 문제λ₯Ό μ•ΌκΈ°ν•  수 μžˆμœΌλ―€λ‘œ μˆ˜μ •μ΄ ν•„μš”ν•©λ‹ˆλ‹€. λ˜ν•œ, μ„€μ • 파일의 μœ μ—°μ„±κ³Ό ν‘œμ€€ μ€€μˆ˜λ₯Ό μœ„ν•΄ λͺ‡ κ°€μ§€ μˆ˜μ •μ„ μ œμ•ˆν–ˆμŠ΅λ‹ˆλ‹€. μžμ„Έν•œ λ‚΄μš©μ€ 각 파일의 주석을 ν™•μΈν•΄μ£Όμ„Έμš”.

- mynetwork

dcgm-exporter:
image: nvcr.io/nvidia/k8s/dcgm-exporter:latest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Docker 이미지에 latest νƒœκ·Έλ₯Ό μ‚¬μš©ν•˜λŠ” 것은 ν”„λ‘œλ•μ…˜ ν™˜κ²½μ—μ„œ μœ„ν—˜ν•  수 μžˆμŠ΅λ‹ˆλ‹€. latest νƒœκ·ΈλŠ” μ–Έμ œλ“ μ§€ 변경될 수 μžˆμ–΄, 예기치 μ•Šμ€ 버전이 λ°°ν¬λ˜μ–΄ μž₯μ• λ₯Ό μœ λ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ•ˆμ •μ μΈ 배포λ₯Ό μœ„ν•΄ 3.3.5-3.4.2-ubuntu22.04와 같이 ꡬ체적인 버전 νƒœκ·Έλ₯Ό μ‚¬μš©ν•΄μ£Όμ„Έμš”.

      image: nvcr.io/nvidia/k8s/dcgm-exporter:3.3.5-3.4.2-ubuntu22.04

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

logging은 Python의 ν‘œμ€€ λ‚΄μž₯ λͺ¨λ“ˆμ΄λ―€λ‘œ requirements.txt에 λͺ…μ‹œν•  ν•„μš”κ°€ μ—†μŠ΅λ‹ˆλ‹€. 였히렀 PyPI에 λ“±λ‘λœ loggingμ΄λΌλŠ” μ΄λ¦„μ˜ λ‹€λ₯Έ νŒ¨ν‚€μ§€κ°€ μ„€μΉ˜λ˜μ–΄ μ˜λ„μΉ˜ μ•Šμ€ λ™μž‘μ„ μœ λ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 쀄을 μ œκ±°ν•΄μ£Όμ„Έμš”.


networks:
mynetwork:
driver: bridge No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

파일 끝에 μƒˆ 쀄(newline)이 μ—†μŠ΅λ‹ˆλ‹€. POSIX ν˜Έν™˜μ„±μ„ μœ„ν•΄, 그리고 일뢀 ν…μŠ€νŠΈ 처리 λ„κ΅¬μ™€μ˜ 예기치 μ•Šμ€ 문제λ₯Ό λ°©μ§€ν•˜κΈ° μœ„ν•΄ 파일 끝에 μƒˆ 쀄을 μΆ”κ°€ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

Comment on lines +19 to +24
- 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']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

127.0.0.1:9090으둜 νƒ€κ²Ÿμ„ ν•˜λ“œμ½”λ”©ν•˜λ©΄ λ‹€λ₯Έ ν™˜κ²½μ—μ„œ μž¬μ‚¬μš©ν•˜κ±°λ‚˜ ꡬ성을 λ³€κ²½ν•  λ•Œ μœ μ—°μ„±μ΄ λ–¨μ–΄μ§‘λ‹ˆλ‹€. μ΄μ „μ²˜λŸΌ ${REMOTE_HOST}와 같은 ν™˜κ²½ λ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜κ±°λ‚˜, 이것이 μ˜λ„λœ 변경이라면 μ™œ ν•˜λ“œμ½”λ”©μ΄ ν•„μš”ν•œμ§€μ— λŒ€ν•œ 주석을 μΆ”κ°€ν•˜λŠ” 것을 κ³ λ €ν•΄ λ³΄μ„Έμš”.

- targets: [ 'app-green:8001' ] No newline at end of file
- targets: ['dcgm-exporter:9400']
labels:
exporter: 'dcgm' No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

파일 끝에 μƒˆ 쀄(newline)이 μ—†μŠ΅λ‹ˆλ‹€. POSIX ν˜Έν™˜μ„±μ„ μœ„ν•΄, 그리고 일뢀 ν…μŠ€νŠΈ 처리 λ„κ΅¬μ™€μ˜ 예기치 μ•Šμ€ 문제λ₯Ό λ°©μ§€ν•˜κΈ° μœ„ν•΄ 파일 끝에 μƒˆ 쀄을 μΆ”κ°€ν•˜λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant