apiVersion: apps/v1 kind: Deployment metadata: name: vllm-nsys-inject spec: replicas: 1 selector: matchLabels: app: vllm-nsys template: metadata: labels: app: vllm-nsys spec: hostPID: true volumes: - name: nsys-bin emptyDir: {} - name: profile-output emptyDir: {} - name: dshm emptyDir: medium: Memory sizeLimit: 16Gi # 1. nsys가 포함된 공식 이미지에서 바이너리만 볼륨으로 복사 initContainers: - name: copy-nsys # Nsight Systems가 내장된 NVIDIA 공식 devel 이미지 사용 image: nvidia/cuda:12.4.1-devel-ubuntu22.04 command: ["/bin/sh", "-c"] args: - | cp -r /opt/nvidia/nsight-systems/* /nsys-target/ volumeMounts: - name: nsys-bin mountPath: /nsys-target # 2. 원본 vLLM 이미지는 수정 없이 그대로 실행 containers: - name: vllm image: vllm/vllm-openai:latest securityContext: capabilities: add: ["SYS_ADMIN", "SYS_PTRACE"] env: - name: VLLM_WORKER_MULTIPROC_METHOD value: "spawn" command: ["/bin/sh", "-c"] args: - | # 복사된 경로에서 nsys 실행 파일 찾아서 실행 NSYS_PATH=$(find /nsys -name nsys -type f | head -n 1) $NSYS_PATH profile \ --trace=cuda,nvtx,osrt \ --trace-fork-before-exec=true \ --cuda-graph-trace=node \ --capture-range=cudaProfilerApi \ --capture-range-end=repeat \ -o /profiles/vllm_trace_%p \ vllm serve meta-llama/Llama-3.1-8B-Instruct \ --profiler-config '{"profiler": "cuda"}' resources: limits: nvidia.com/gpu: 1 volumeMounts: - name: nsys-bin mountPath: /nsys - name: profile-output mountPath: /profiles - name: dshm mountPath: /dev/shm AI & ML
Source:https://dev.to/shingyeongseon/config-init-container-for-nsigth-command-3faj
config init container for Nsigth Command
dev.to Docker0 views
PreviousDocker Engine: which versions still get updatesNextSPF, DKIM and DMARC Explained: Stop Emails Going to Spam
Related posts
Show HN: I cut an LLM's screen-watching cost to ~138 tokens per step
0Hacker News New
Codeberg's Domain Was Suspended
0Hacker News New
Gemini AI agents repeatedly bypassed safeguards to attack real website
0Hacker News New
A new AI agent builder. No-code visual builder with customer support platform
0Hacker News New
Jacob Tsimerman on AI can supercharge mathematics [video]
0Hacker News New
Show HN: Production Grammar-Guided Decoding in vLLM with Xgrammar Benchmarks
0Hacker News Show