Skip to content

Commit 0c19e52

Browse files
authored
Singleuser updates (#10)
* Updated dockerfiles + requirements (handling cpu-only build packages). * Updated medcat version, re-added m-cat scripts download.
1 parent 5bfbd62 commit 0c19e52

File tree

4 files changed

+12
-61
lines changed

4 files changed

+12
-61
lines changed

.github/workflows/submodule_sync.yml

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

Dockerfile_hub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ RUN apt-get clean autoclean && apt-get autoremove --purge -y
9393
RUN pip3 install --no-cache-dir --upgrade pip
9494

9595
# utils for jupyterhub
96-
RUN pip3 install --no-cache-dir setuptools wheel virtualenv cython netifaces
96+
RUN pip3 install --no-cache-dir setuptools wheel
9797

9898
# jupyterhub stuff
9999
RUN pip3 install --no-cache-dir ipywidgets importlib_metadata jupyterhub-firstuseauthenticator dockerspawner jupyterhub-nativeauthenticator

Dockerfile_singleuser

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,18 @@ RUN uv pip install --upgrade --system pip setuptools wheel
213213
# install the rest of the packages including medcat
214214
COPY ./requirements.txt /srv/jupyterhub/
215215

216+
# https://download.pytorch.org/whl/cpu is out of date on packages, using alternative URL for CPU
216217
RUN if [ "$GPU_BUILD" = "true" ] && [ "$CPU_ARCHITECTURE" = "amd64" ]; then \
217-
uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt ; \
218+
uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt && \
219+
uv run python -m medcat download-scripts /srv/jupyterhub/medcat-scripts ; \
218220
else \
219-
uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt ; \
221+
uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt --index-url https://pypi.org/simple && \
222+
uv run python -m medcat download-scripts /srv/jupyterhub/medcat-scripts ; \
220223
fi
221224

225+
# move notebooks
226+
RUN mv /srv/jupyterhub/medcat-scripts/* /home/jovyan/work/.
227+
222228
#######################################################################################################
223229

224230
# install R and other dependencies

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
wheel==0.45.1
22

3+
medcat==2.3.0
4+
# TODO: cogstack-es 8/9 handling
35

46
virtualenv==20.31.2
57
ipywidgets==8.1.7
@@ -34,7 +36,7 @@ dataclasses==0.6
3436
jsonpickle==4.1.0
3537
jsonext==0.4.2
3638
psycopg2==2.9.10
37-
psycopg2-binary==2.9.10
39+
psycopg2-binary>=2.9.10
3840
pyodbc==5.2.0
3941
openpyxl==3.1.5
4042
dvc==3.59.2

0 commit comments

Comments
 (0)