Skip to content

Commit 29e8dd9

Browse files
feat(test): RunPod GPU cost attribution demo + test Dockerfile
Dockerfile.test: builds agent from source + PyTorch cu124 — no PyPI release needed; works on any RunPod GPU Pod. agent/tests/runpod_demo.py: end-to-end demo that proves the cost attribution story: Phase 1 — idle baseline: sample GPU power with no workload; show projected monthly cost of leaving GPUs idle unmonitored Phase 2 — fp32 dense matmul: saturate CUDA cores, record TFLOPS Phase 3 — bf16 matmul: tensor core path, compare power vs TFLOPS Phase 4 — token generation: simulated attention loop, tokens/s Summary table: avg W, baseline-adjusted W, kWh/TFLOP, $/hr, $/month --upload flag: submits best result to Green AI Index leaderboard Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4ae6978 commit 29e8dd9

2 files changed

Lines changed: 571 additions & 0 deletions

File tree

Dockerfile.test

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# AluminatiAI — RunPod test image
2+
#
3+
# Builds the agent from source (no PyPI release needed) and bundles
4+
# PyTorch so the demo workload can actually saturate the GPU.
5+
#
6+
# Build:
7+
# docker build -f Dockerfile.test -t aluminatai-test .
8+
#
9+
# Run on RunPod GPU Pod (pick any CUDA-capable template, then SSH in and run):
10+
# docker run --rm --gpus all --pid=host \
11+
# -e ALUMINATAI_API_KEY=alum_... \
12+
# -e ALUMINATAI_TEAM=demo \
13+
# -e DRY_RUN=0 \
14+
# -e METRICS_PORT=9100 \
15+
# -p 9100:9100 \
16+
# aluminatai-test python3 /app/tests/runpod_demo.py
17+
#
18+
# Or to just drop into a shell and poke around:
19+
# docker run --rm -it --gpus all --pid=host aluminatai-test bash
20+
21+
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
22+
23+
ENV DEBIAN_FRONTEND=noninteractive \
24+
PYTHONUNBUFFERED=1 \
25+
PYTHONDONTWRITEBYTECODE=1
26+
27+
RUN apt-get update && \
28+
apt-get install -y --no-install-recommends \
29+
python3-pip \
30+
curl \
31+
&& rm -rf /var/lib/apt/lists/*
32+
33+
WORKDIR /app
34+
35+
# Install PyTorch (CPU+CUDA wheel — lets us run GPU workloads for the demo)
36+
RUN pip3 install --no-cache-dir \
37+
torch --index-url https://download.pytorch.org/whl/cu124
38+
39+
# Install agent dependencies + prometheus support
40+
COPY agent/pyproject.toml /app/
41+
COPY agent/ /app/
42+
RUN pip3 install --no-cache-dir \
43+
"nvidia-ml-py>=12.0.0" \
44+
"requests>=2.28" \
45+
"python-dotenv>=1.0" \
46+
"rich>=13.0" \
47+
"prometheus-client>=0.19" \
48+
"numpy>=1.24"
49+
50+
# Copy test scripts
51+
COPY agent/tests/ /app/tests/
52+
53+
# Default: run the demo
54+
CMD ["python3", "/app/tests/runpod_demo.py"]

0 commit comments

Comments
 (0)