From eda5ba08a04ef7778a41ac7df2b498e6f3698e60 Mon Sep 17 00:00:00 2001 From: Lumpiasty Date: Sat, 19 Apr 2025 03:30:58 +0200 Subject: [PATCH] add gpt-researcher --- apps/kustomization.yaml | 1 + apps/researcher/deployment.yaml | 59 ++++++++++++++++++++++++++++++ apps/researcher/ingress.yaml | 28 ++++++++++++++ apps/researcher/kustomization.yaml | 7 ++++ apps/researcher/namespace.yaml | 5 +++ 5 files changed, 100 insertions(+) create mode 100644 apps/researcher/deployment.yaml create mode 100644 apps/researcher/ingress.yaml create mode 100644 apps/researcher/kustomization.yaml create mode 100644 apps/researcher/namespace.yaml diff --git a/apps/kustomization.yaml b/apps/kustomization.yaml index a9d78d7..5230623 100644 --- a/apps/kustomization.yaml +++ b/apps/kustomization.yaml @@ -5,3 +5,4 @@ resources: - renovate - ollama - librechat + - researcher diff --git a/apps/researcher/deployment.yaml b/apps/researcher/deployment.yaml new file mode 100644 index 0000000..c90dedb --- /dev/null +++ b/apps/researcher/deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gpt-resercher + namespace: gpt-researcher +spec: + replicas: 1 + selector: + matchLabels: + app: gpt-resercher + template: + metadata: + labels: + app: gpt-resercher + spec: + containers: + - name: gpt-resercher + image: gptresearcher/gpt-researcher:latest + ports: + - containerPort: 8000 + resources: + requests: + cpu: "2" + memory: "4Gi" + limits: + cpu: "3" + memory: "5Gi" + env: + - name: OPENAI_API_BASE + value: "http://ollama.ollama.svc.cluster.local:11434/v1" + - name: OPENAI_API_KEY + value: "123" + - name: OLLAMA_BASE_URL + value: "http://ollama.ollama.svc.cluster.local:11434" + - name: FAST_LLM + value: "openai:granite3.3:2b" + - name: SMART_LLM + value: "openai:granite3.3:8b" + - name: STRATEGIC_LLM + value: "openai:deepseek-r1:14b" + - name: EMBEDDING + value: "ollama:nomic-embed-text" + - name: RETRIEVER + value: duckduckgo + - name: SCRAPER + value: bs +--- +apiVersion: v1 +kind: Service +metadata: + name: gpt-resercher-service + namespace: gpt-researcher +spec: + selector: + app: gpt-resercher + ports: + - protocol: TCP + port: 80 + targetPort: 8000 diff --git a/apps/researcher/ingress.yaml b/apps/researcher/ingress.yaml new file mode 100644 index 0000000..0a0ad98 --- /dev/null +++ b/apps/researcher/ingress.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + namespace: gpt-researcher + name: researcher + annotations: + cert-manager.io/cluster-issuer: letsencrypt + acme.cert-manager.io/http01-edit-in-place: "true" + nginx.ingress.kubernetes.io/proxy-buffering: "false" + nginx.ingress.kubernetes.io/proxy-read-timeout: 30m +spec: + ingressClassName: nginx + rules: + - host: researcher.lumpiasty.xyz + http: + paths: + - backend: + service: + name: gpt-resercher-service + port: + number: 80 + path: / + pathType: Prefix + tls: + - hosts: + - researcher.lumpiasty.xyz + secretName: researcher-ingress diff --git a/apps/researcher/kustomization.yaml b/apps/researcher/kustomization.yaml new file mode 100644 index 0000000..bcb5e01 --- /dev/null +++ b/apps/researcher/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - deployment.yaml + - ingress.yaml diff --git a/apps/researcher/namespace.yaml b/apps/researcher/namespace.yaml new file mode 100644 index 0000000..bdde1b3 --- /dev/null +++ b/apps/researcher/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: gpt-researcher