From 0d1f345cb30449fd3e92f63af10d24a92969a159 Mon Sep 17 00:00:00 2001 From: sirius0xdev Date: Wed, 25 Mar 2026 00:28:36 +0000 Subject: [PATCH] Release the Beast! added deepseek as the new analyst model with a new h100 nodepool --- .../news_bot/deepseek-configmap.yaml | 77 +++++++++++++++++++ .../news_bot/deepseek-summarizer.yaml | 71 +++++++++++++++++ .../customer1/news_bot/gemma-configmap.yaml | 2 +- .../customer1/news_bot/kustomization.yaml | 4 +- modules/a3_nodepool.tf | 49 ++++++++++++ 5 files changed, 201 insertions(+), 2 deletions(-) create mode 100644 apps/base/customer1/news_bot/deepseek-configmap.yaml create mode 100644 apps/base/customer1/news_bot/deepseek-summarizer.yaml create mode 100644 modules/a3_nodepool.tf diff --git a/apps/base/customer1/news_bot/deepseek-configmap.yaml b/apps/base/customer1/news_bot/deepseek-configmap.yaml new file mode 100644 index 0000000..7d08e49 --- /dev/null +++ b/apps/base/customer1/news_bot/deepseek-configmap.yaml @@ -0,0 +1,77 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: deepseek-config + namespace: customer1 +data: + DB_HOST: "customer1-pgdb-rw" + DB_NAME: "news_app_db" + DB_USER: "news_app" + DB_PORT: "5432" + LLM_URL: "http://localhost:11434" + MODEL_NAME: "deepseek-r1:70b" + + MAP_PROMPT: | + # ROLE + You are a World-Class Financial Intelligence Agent for an Elite Futures Trader. + + # MISSION + Analyze the provided batch of full-text articles. Your goal is to extract "Market-Moving DNA." Translate all non-English sources into high-fidelity English. + + # REASONING PROTOCOL () + For each article, internally execute these steps: + 1. CAUSAL CHAIN: If this event happens, which secondary asset moves? + 2. BURIED ALPHA: Identify specific numbers (percentages, dates, volumes) buried in paragraphs, not just headlines. + 3. SINCERITY CHECK: Is the source biased or speculative? + + # TASK + For each article in the batch, provide: + - TITLE & SOURCE (Translated) + - IMPACT RATING (1-10): [1 = Noise | 10 = Black Swan/Systemic Change] + - TICKERS/SYMBOLS: [e.g., /ES, /CL, /GC, /6E, /NQ, /ZS] + - FACTUAL BULLETS (3-6): Focus strictly on data, logic, and structural shifts. + - ANALYST NOTES: Brief "Thinking" note on why this matters for a day trader's edge (e.g., "Expected liquidity gap at NY open due to this news"). + + # DATA TO PROCESS + {batch_text} + + SUMMARY_PROMPT: | + # ROLE + Lead Futures Strategist & Macro-Economist. + + # OBJECTIVE + Synthesize the processed news batch into a high-conviction "Trading Edge" report. + + # REASONING PROTOCOL () + 1. NARRATIVE SYNERGY: Do multiple articles point to the same "hidden" trend (e.g., Energy supply tightening across 3 different regions)? + 2. CONTRADICTION DETECTION: Identify if two reports are giving conflicting signals. + 3. REGIME CHECK: Does this news signal a Trend Extension or a Mean Reversion opportunity? + + # TASK + Filter for the top 5-10 high-signal events. Use historical analogies (e.g., "Similar to the 2022 supply crunch") to quantify potential moves. + + # OUTPUT (Telegram-friendly Markdown) + **SUMMARY DASHBOARD** + --- + **Scanned:** [Total] | **High Signal:** [Count] + **Primary Targets:** [e.g., /CL, /ES, /GC] + **Sentiment Alert:** [1-sentence "Bottom Line" for the hour] + + **STRATEGIC INSIGHTS** + --- + **[Symbol] | [Directional Bias] | [Impact H/M/L]** + • **The Edge:** [Actionable entry/exit/monitoring signal. What is the specific price-action trigger?] + • **Rationale:** [Synthesized reasoning from multiple sources.] + • **Confidence:** [1-10] | **Risk:** [What invalidates this thesis?] + + **WATCHLIST & LAGGARDS** + --- + [Briefly list symbols to monitor that are secondary to the main move.] + + # CONSTRAINTS + - No hype. + - Data-driven only. + - If no significant news exists, output: "No significant futures-impacting news in this batch." + + # INPUT DATA + {final_input} diff --git a/apps/base/customer1/news_bot/deepseek-summarizer.yaml b/apps/base/customer1/news_bot/deepseek-summarizer.yaml new file mode 100644 index 0000000..70f5020 --- /dev/null +++ b/apps/base/customer1/news_bot/deepseek-summarizer.yaml @@ -0,0 +1,71 @@ + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: deepseek-analyst + namespace: customer1 +spec: + schedule: "15 * * * *" + jobTemplate: + spec: + template: + spec: + nodeSelector: + cloud.google.com/gke-accelerator: nvidia-h100-80gb + tolerations: + - key: "nvidia.com/gpu-h100" + operator: "Equal" + value: "present" + effect: "NoSchedule" + volumes: + - name: deepseek-storage + persistentVolumeClaim: + claimName: deepseek-storage + + + initContainers: + - name: model-puller + image: ollama/ollama:latest + volumeMounts: + - name: deepseek-storage + mountPath: /root/.ollama + command: ["/bin/sh", "-c"] + args: ["ollama serve & sleep 5 && ollama pull deepseek-r1:70b"] + + + - name: ollama-sidecar + image: ollama/ollama:latest + restartPolicy: Always + env: + - name: OLLAMA_DEBUG + value: "2" + - name: OLLAMA_LOG_LEVEL + value: "DEBUG" + ports: + - containerPort: 11434 + volumeMounts: + - name: deepseek-storage + mountPath: /root/.ollama + resources: + limits: + nvidia.com/gpu: 1 + memory: "85Gi" + requests: + nvidia.com/gpu: "1" + memory: "32Gi" + + containers: + - name: analyst + image: siriussec/summarizerlocal:3.5 + imagePullPolicy: Always + env: + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: news-app-password + key: password + envFrom: + - configMapRef: + name: deepseek-config + + restartPolicy: OnFailure diff --git a/apps/base/customer1/news_bot/gemma-configmap.yaml b/apps/base/customer1/news_bot/gemma-configmap.yaml index adee961..faae936 100644 --- a/apps/base/customer1/news_bot/gemma-configmap.yaml +++ b/apps/base/customer1/news_bot/gemma-configmap.yaml @@ -10,7 +10,7 @@ data: DB_PORT: "5432" LLM_URL: "http://localhost:11434" MODEL_NAME: "mistral-small" - + MAP_PROMPT: | You are a state of the art AI News analysis diff --git a/apps/base/customer1/news_bot/kustomization.yaml b/apps/base/customer1/news_bot/kustomization.yaml index ccc0df4..9557d03 100644 --- a/apps/base/customer1/news_bot/kustomization.yaml +++ b/apps/base/customer1/news_bot/kustomization.yaml @@ -11,7 +11,9 @@ resources: - telebot-cronjob.yaml - telebot-secret.yaml - gemma-configmap.yaml - - analyst-cronjob.yaml + # - analyst-cronjob.yaml - ollama-storage.yaml - news-app-password.yaml - news-app-db.yaml + - deepseek-summarizer.yaml + - deepseek-configmap.yaml diff --git a/modules/a3_nodepool.tf b/modules/a3_nodepool.tf new file mode 100644 index 0000000..39f636e --- /dev/null +++ b/modules/a3_nodepool.tf @@ -0,0 +1,49 @@ +resource "google_container_node_pool" "h100_node_pool" { + name = "h100-analyst-pool" + location = "us-central1-a" + cluster = google_container_cluster.primary.name + + initial_node_count = 0 + autoscaling { + min_node_count = 0 + max_node_count = 1 + } + + node_config { + machine_type = "a3-highgpu-1g" + + guest_accelerator { + type = "nvidia-h100-80gb" + count = 1 + + gpu_driver_installation_config { + gpu_driver_version = "LATEST" + } + } + + taint { + key = "nvidia.com/gpu-h100" + value = "present" + effect = "NO_SCHEDULE" + } + + labels = { + accelerator = "h100-single" + } + disk_size_gb = 200 + disk_type = "pd-ssd" + spot = true + + oauth_scopes = [ + "https://www.googleapis.com/auth/cloud-platform"] + + metadata = { + disable-legacy-endpoints = "true" + } + } + + management { + auto_repair = true + auto_upgrade = true + } +}