Skip to content

Commit bc687ef

Browse files
authored
Merge pull request #6 from mart-r/CU-869az43jq-distribut-cogstack-es
CU-869az43jq: MedCAT v2: Distribute cogstack-es and medcat-scripts
2 parents 27232ec + 133fb7b commit bc687ef

File tree

4 files changed

+14
-65
lines changed

4 files changed

+14
-65
lines changed

.github/workflows/submodule_sync.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

Dockerfile_singleuser

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ARG http_proxy
77
ARG https_proxy
88
ARG no_proxy
99

10+
# NOTE: set to ES8 or Elasticsearch 8 or OS for Opensearch
11+
ARG COGSTACK_BACKEND=ES9
12+
1013
# set to "true" for the GPU build
1114
ARG GPU_BUILD=false
1215

@@ -212,16 +215,20 @@ RUN uv pip install --upgrade --system pip setuptools wheel
212215

213216
# install the rest of the packages including medcat
214217
COPY ./requirements.txt /srv/jupyterhub/
215-
# install requirements for working with cogstack scripts
216-
COPY notebooks/demo_working_with_cogstack/requirements.txt /srv/jupyterhub/working_with_cogstack_requirements.txt
217218

218219
RUN if [ "$GPU_BUILD" = "true" ] && [ "$CPU_ARCHITECTURE" = "amd64" ]; then \
219220
uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt && \
220-
uv pip install --system --no-cache-dir -r /srv/jupyterhub/working_with_cogstack_requirements.txt ; \
221+
# NOTE: it'll create the medcat-scripts folder within
222+
uv run python -m medcat download-scripts /srv/jupyterhub/ && \
223+
uv pip install --system --no-cache-dir -r /srv/jupyterhub/medcat-scripts/requirements.txt ; \
221224
else \
222225
uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu/ && \
223-
uv pip install --system --no-cache-dir -r /srv/jupyterhub/working_with_cogstack_requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu/ ; \
224-
fi
226+
uv run python -m medcat download-scripts /srv/jupyterhub/ && \
227+
uv pip install --system --no-cache-dir -r /srv/jupyterhub/medcat-scripts/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu/ ; \
228+
fi && \
229+
# install cogstack-es (Cogstack class)
230+
uv pip install "cogstack-es[$COGSTACK_BACKEND]" && \
231+
mv /srv/jupyterhub/medcat-scripts/notebooks/* /home/jovyan/work/. # move notebooks
225232

226233
#######################################################################################################
227234

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
wheel==0.45.1
2+
medcat==2.2.0
3+
# TODO: cogstack-es
24
virtualenv==20.31.2
35
ipywidgets==8.1.7
46
jupyter==1.1.1

0 commit comments

Comments
 (0)