Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ nav:
- Elasticsearch: overview/Elasticsearch.md
# - NiFi: data-engineering/nifi.md
- NiFi: '!import https://github.com/CogStack/CogStack-NiFi?branch=main&docs_dir=docs/*&config=mkdocs.yml'
- OCR Service Tutorial: data-engineering/ocr-service-tutorial.ipynb

- NLP:
- Overview: cogstack-ai/index.md
Expand Down
4 changes: 4 additions & 0 deletions docs/scripts/copy_files_from_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/medcat-opensearch-e2e.ipynb",
"outputFilePath": "cogstack-ce/tutorial/medcat-opensearch-e2e.ipynb",
},
{
"sourceFilePath": "helm-charts/cogstack-jupyterhub-helm/examples/ocr-service-tutorial.ipynb",
"outputFilePath": "data-engineering/ocr-service-tutorial.ipynb",
},
]


Expand Down
13 changes: 8 additions & 5 deletions helm-charts/cogstack-ce-helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dependencies:
- name: medcat-service-helm
repository: file://../medcat-service-helm
version: 0.5.0
version: 0.6.0
- name: medcat-service-helm
repository: file://../medcat-service-helm
version: 0.5.0
version: 0.6.0
- name: medcat-trainer-helm
repository: file://../medcat-trainer-helm
version: 0.5.0
version: 0.5.1
- name: opensearch
repository: https://opensearch-project.github.io/helm-charts/
version: 3.5.0
Expand All @@ -17,5 +17,8 @@ dependencies:
- name: cogstack-jupyterhub-helm
repository: file://../cogstack-jupyterhub-helm
version: 0.0.1
digest: sha256:53f0d3986395d1e402a5409d7b69beb576ead2376630a05f608e44acd451c2c9
generated: "2026-09-17T09:23:54.811701571Z"
- name: ocr-service-helm
repository: file://../ocr-service-helm
version: 0.1.0
digest: sha256:f03a094b399753bca80b2ebe922bdd1f365bcde4f3c0d5c4d678b61b3834c3c2
generated: "2026-10-21T09:43:39.637902212Z"
5 changes: 5 additions & 0 deletions helm-charts/cogstack-ce-helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ dependencies:
condition: cogstack-jupyterhub.enabled
version: ">=0.0.1"
repository: "file://../cogstack-jupyterhub-helm"
- name: ocr-service-helm
alias: ocr-service
condition: cogstack-jupyterhub.enabled
version: ">=0.0.1"
repository: "file://../ocr-service-helm"
6 changes: 6 additions & 0 deletions helm-charts/cogstack-ce-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ kubectl delete namespace cogstack
| file://../medcat-service-helm | medcat-service(medcat-service-helm) | >=0.0.1 |
| file://../medcat-service-helm | anoncat-service(medcat-service-helm) | >=0.0.1 |
| file://../medcat-trainer-helm | medcat-trainer(medcat-trainer-helm) | >=0.0.1 |
| file://../ocr-service-helm | ocr-service(ocr-service-helm) | >=0.0.1 |
| https://opensearch-project.github.io/helm-charts/ | opensearch | 3.5.0 |
| https://opensearch-project.github.io/helm-charts/ | opensearch-dashboards | 3.5.0 |

Expand All @@ -111,6 +112,9 @@ kubectl delete namespace cogstack
| cogstack-jupyterhub.jupyterhub.singleuser.extraEnv.ANONCAT_SERVICE_URL.valueFrom.configMapKeyRef.name | string | `"cogstack-ce-helm-jupyterhub-config"` | |
| cogstack-jupyterhub.jupyterhub.singleuser.extraEnv.MEDCAT_SERVICE_URL.valueFrom.configMapKeyRef.key | string | `"MEDCAT_SERVICE_URL"` | |
| cogstack-jupyterhub.jupyterhub.singleuser.extraEnv.MEDCAT_SERVICE_URL.valueFrom.configMapKeyRef.name | string | `"cogstack-ce-helm-jupyterhub-config"` | |
| cogstack-jupyterhub.jupyterhub.singleuser.extraEnv.OCR_SERVICE_URL.name | string | `"OCR_SERVICE_URL"` | |
| cogstack-jupyterhub.jupyterhub.singleuser.extraEnv.OCR_SERVICE_URL.valueFrom.configMapKeyRef.key | string | `"OCR_SERVICE_URL"` | |
| cogstack-jupyterhub.jupyterhub.singleuser.extraEnv.OCR_SERVICE_URL.valueFrom.configMapKeyRef.name | string | `"cogstack-ce-helm-jupyterhub-config"` | |
| cogstack-jupyterhub.jupyterhub.singleuser.image.name | string | `"cogstacksystems/jupyter-singleuser"` | JupyterHub singleuser image name. |
| cogstack-jupyterhub.jupyterhub.singleuser.image.pullPolicy | string | `"IfNotPresent"` | JupyterHub singleuser image pull policy. |
| cogstack-jupyterhub.jupyterhub.singleuser.image.tag | string | `"2.2.2"` | JupyterHub singleuser image tag. |
Expand All @@ -124,6 +128,8 @@ kubectl delete namespace cogstack
| medcat-trainer.provisioning.enabled | bool | `true` | Enable provisioning of projects and models on startup. |
| medcat-trainer.provisioning.existingConfigMap.name | string | `"cogstack-ce-helm-example-trainer-provisioining"` | Existing ConfigMap name containing the provisioning configuration. |
| nameOverride | string | `""` | This is to override the chart name. |
| ocr-service.enabled | bool | `true` | Enable MedCAT service deployment. |
| ocr-service.replicasCount | int | `1` | Number of MedCAT service replicas. |
| opensearch-dashboards.enabled | bool | `true` | Deploy an opensearch-dashboards instance |
| opensearch.enabled | bool | `true` | Deploy an opensearch cluster |
| opensearch.extraEnvs | list | Sets the initial admin password for OpenSearch | Extra environment variables to pass to OpenSearch. |
Expand Down
8 changes: 8 additions & 0 deletions helm-charts/cogstack-ce-helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ export JUPYTERHUB_PROXY_SERVICE_PORT=$(kubectl get svc $JUPYTERHUB_PROXY_PUBLIC_
kubectl --namespace {{ .Release.Namespace }} port-forward svc/$JUPYTERHUB_PROXY_PUBLIC_SERVICE 8000:$JUPYTERHUB_PROXY_SERVICE_PORT &
{{- end }}

{{- if index .Values "ocr-service" "enabled" }}
# 5. OCR Service
export OCR_SERVICE_POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name=ocr-service,app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $OCR_SERVICE_POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
kubectl --namespace {{ .Release.Namespace }} port-forward $OCR_SERVICE_POD_NAME 8090:$CONTAINER_PORT --pod-running-timeout=5m0s &
{{- end }}

echo "Visit http://127.0.0.1:5000 to use MedCAT Service"
echo "Visit http://127.0.0.1:5001 to use AnonCAT"
echo "Visit http://127.0.0.1:8080 to use MedCAT Trainer"
{{ if .Values.opensearch.enabled }}echo "Visit https://127.0.0.1:9200 to use OpenSearch"{{- end }}
{{ if index .Values "opensearch-dashboards" "enabled" }}echo "Visit http://127.0.0.1:5601 to use OpenSearch Dashboards"{{- end }}
{{ if index .Values "cogstack-jupyterhub" "enabled" }}echo "Visit http://127.0.0.1:8000 to use jupyterhub"{{- end }}
{{ if index .Values "cogstack-jupyterhub" "enabled" }}echo "Visit http://127.0.0.1:8000/user/admin/notebooks/medcat-service-tutorial.ipynb to get started with a tutorial"{{- end }}
{{ if index .Values "ocr-service" "enabled" }}echo "Visit http://127.0.0.1:8090/ to use OCR Service"{{- end }}

# Setup Complete
# Run this command line to setup port-forwarding and access services
Expand Down
18 changes: 18 additions & 0 deletions helm-charts/cogstack-ce-helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ http://{{ include "anoncat-service.service-name" . }}:{{ include "anoncat-servic
{{- end -}}
{{- end -}}

{{- define "ocr-service.service-name" -}}
{{ include "ocr-service-helm.fullname" (dict "Values" .Values "Chart" (dict "Name" "ocr-service") "Release" .Release ) }}
{{- end -}}

{{- define "ocr-service.port" -}}
{{ index .Values "ocr-service" "service" "port" }}
{{- end -}}

{{- define "ocr-service.url" -}}
{{- $url := (index .Values "ocr-service" "url") | default "" -}}
{{- if $url -}}
{{ $url }}
{{- else if not (index .Values "ocr-service" "enabled") -}}
"unset"
{{- else -}}
http://{{ include "ocr-service.service-name" . }}:{{ include "ocr-service.port" . }}
{{- end -}}
{{- end -}}


{{- define "opensearch.url" -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ metadata:
data:
MEDCAT_SERVICE_URL: {{ include "medcat-service.url" . }}
ANONCAT_SERVICE_URL: {{ include "anoncat-service.url" . }}
OCR_SERVICE_URL: {{ include "ocr-service.url" . }}
17 changes: 17 additions & 0 deletions helm-charts/cogstack-ce-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ medcat-service:
# -- MedCAT service image tag.
# tag: "1.3.0"

ocr-service:
# -- Enable MedCAT service deployment.
enabled: true
# -- Number of MedCAT service replicas.
replicasCount: 1
# image:
# -- OCR service image repository.
# repository: cogstacksystems/ocr-service
# -- OCR service image tag.
# tag: "1.1.1"

medcat-trainer:
# -- Enable MedCAT Trainer deployment.
enabled: true
Expand Down Expand Up @@ -126,3 +137,9 @@ cogstack-jupyterhub:
configMapKeyRef:
name: cogstack-ce-helm-jupyterhub-config
key: ANONCAT_SERVICE_URL
OCR_SERVICE_URL:
name: OCR_SERVICE_URL
valueFrom:
configMapKeyRef:
name: cogstack-ce-helm-jupyterhub-config
key: OCR_SERVICE_URL
Loading
Loading