11services :
2- # Pod 1: Data Gather - Financial Fraud Data Generator
2+ # Pod 1: Data Gather - High-throughput transaction generator
33 data-gather :
44 build : ./pods/data-gather
55 container_name : fraud-detection-gather
6- tty : false
7- stdin_open : false
86 volumes :
9- - ${TEMPLATE_MOUNT:-/mnt/datasets/kaggle/creditcardfraud}:/mnt/datasets/kaggle/creditcardfraud:ro
10- - ${FB_OUTPUT_MOUNT:-/mnt/fsaai-shared/ebiser/fraud-data}:/mnt/fsaai-shared/ebiser/fraud-data
7+ - /mnt/fsaai-shared/ebiser/fraud-data:/mnt/fsaai-shared/ebiser/fraud-data
118 environment :
12- - TEMPLATE_DIR=/mnt/datasets/kaggle/creditcardfraud
13- - TEMPLATE_FILE=creditcard.csv
149 - OUTPUT_DIR=/mnt/fsaai-shared/ebiser/fraud-data
1510 - NUM_WORKERS=${NUM_WORKERS:-128}
1611 - DURATION_SECONDS=${DURATION_SECONDS:-300}
17- - CHUNK_SIZE=${CHUNK_SIZE:-2000000 }
18- - OUTPUT_FORMAT =${OUTPUT_FORMAT:-parquet }
12+ - CHUNK_SIZE=${CHUNK_SIZE:-1000000 }
13+ - FRAUD_RATE =${FRAUD_RATE:-0.005 }
1914 deploy :
2015 resources :
2116 limits :
@@ -31,15 +26,12 @@ services:
3126 networks :
3227 - fraud-detection
3328
34- # Pod 2: Data Prep (Multi-GPU) - RAPIDS Dask-cuDF
29+ # Pod 2: Data Prep (Multi-GPU) - RAPIDS feature engineering
3530 data-prep :
3631 build : ./pods/data-prep
3732 container_name : fraud-detection-prep
38- tty : false
39- stdin_open : false
4033 volumes :
41- - ${FB_OUTPUT_MOUNT:-/mnt/fsaai-shared/ebiser/fraud-data}:/mnt/fsaai-shared/ebiser/fraud-data:ro
42- - ${FB_MOUNT:-/mnt/fsaai-shared/ebiser}:/mnt/fsaai-shared/ebiser
34+ - /mnt/fsaai-shared/ebiser:/mnt/fsaai-shared/ebiser
4335 environment :
4436 - INPUT_DIR=/mnt/fsaai-shared/ebiser/fraud-data
4537 - OUTPUT_DIR=/mnt/fsaai-shared/ebiser/prep-output
@@ -60,61 +52,56 @@ services:
6052 networks :
6153 - fraud-detection
6254
63- # Pod 3: Model Build (GPU Required)
55+ # Pod 3: Model Build (GPU) - XGBoost training
6456 model-build :
6557 build : ./pods/model-build
6658 container_name : fraud-detection-build
67- tty : false
68- stdin_open : false
6959 volumes :
70- - ${FB_MOUNT:- /mnt/fsaai-shared/ebiser} :/mnt/fsaai-shared/ebiser
71- - fa-storage:/root/ebiser/nvidia.financial.fraud.detection
60+ - /mnt/fsaai-shared/ebiser:/mnt/fsaai-shared/ebiser
61+ - model-output:/workspace/model-output
7262 environment :
7363 - FB_MOUNT=/mnt/fsaai-shared/ebiser
74- - FA_MOUNT=/root/ebiser/nvidia.financial.fraud.detection
75- - S3_ENDPOINT=${S3_ENDPOINT}
76- - S3_ACCESS_KEY=${S3_ACCESS_KEY}
77- - S3_SECRET_KEY=${S3_SECRET_KEY}
78- - S3_BUCKET=${S3_BUCKET}
79- - FEATURES_FILE=${FEATURES_FILE}
64+ - FA_MOUNT=/workspace/model-output
65+ - PREP_OUTPUT_DIR=/mnt/fsaai-shared/ebiser/prep-output
66+ - S3_ENDPOINT=${S3_ENDPOINT:-}
67+ - S3_ACCESS_KEY=${S3_ACCESS_KEY:-}
68+ - S3_SECRET_KEY=${S3_SECRET_KEY:-}
69+ - S3_BUCKET=${S3_BUCKET:-}
70+ - FEATURES_FILE=${FEATURES_FILE:-}
8071 deploy :
8172 resources :
8273 reservations :
8374 devices :
8475 - driver : nvidia
85- count : 2
76+ count : 1
8677 capabilities : [gpu]
8778 depends_on :
88- - data-prep
79+ data-prep :
80+ condition : service_completed_successfully
8981 networks :
9082 - fraud-detection
9183
92- # Pod 4: Inference (GPU Required)
84+ # Pod 4: Inference - Triton Server
9385 inference :
94- build : ./pods/inference
86+ image : nvcr.io/nvidia/tritonserver:24.02-py3
9587 container_name : fraud-detection-inference
96- tty : false
97- stdin_open : false
9888 ports :
9989 - " 8000:8000"
10090 - " 8001:8001"
10191 - " 8002:8002"
10292 volumes :
103- - fa-storage:/root/ebiser/nvidia.financial.fraud.detection
104- environment :
105- - FA_MOUNT=/root/ebiser/nvidia.financial.fraud.detection
106- - MODEL_REPOSITORY=/root/ebiser/nvidia.financial.fraud.detection/model_repository
107- - NOTIFICATION_ENDPOINT=http://notification:5000/notify/fraud
93+ - model-output:/workspace/model-output:ro
94+ command : ["tritonserver", "--model-repository=/workspace/model-output/model_repository", "--strict-model-config=false", "--log-verbose=1"]
10895 deploy :
10996 resources :
11097 reservations :
11198 devices :
11299 - driver : nvidia
113- count : 2
100+ count : 1
114101 capabilities : [gpu]
115102 depends_on :
116- - model-build
117- - notification
103+ model-build :
104+ condition : service_completed_successfully
118105 networks :
119106 - fraud-detection
120107 healthcheck :
@@ -123,12 +110,10 @@ services:
123110 timeout : 10s
124111 retries : 3
125112
126- # Pod 5: Notification
113+ # Pod 5: Notification - Alert service
127114 notification :
128115 build : ./pods/notification
129116 container_name : fraud-detection-notification
130- tty : false
131- stdin_open : false
132117 ports :
133118 - " 5000:5000"
134119 environment :
@@ -148,9 +133,5 @@ networks:
148133 driver : bridge
149134
150135volumes :
151- fa-storage :
152- driver : local
153- driver_opts :
154- type : none
155- o : bind
156- device : ${FA_MOUNT:-~/ebiser/nvidia.financial.fraud.detection}
136+ model-output :
137+ driver : local
0 commit comments