diff --git a/.github/workflows/submodule_sync.yml b/.github/workflows/submodule_sync.yml deleted file mode 100755 index e85aab4..0000000 --- a/.github/workflows/submodule_sync.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: submodules-sync - -permissions: - contents: read - -on: - push: - branches: ['**'] - tags: ['v*.*.*'] - pull_request: - branches: ['**'] - release: - types: [published] - workflow_dispatch: - -jobs: - sync: - name: 'Submodules Sync' - runs-on: ubuntu-22.04 - if: github.actor != 'github-actions[bot]' - - defaults: - run: - shell: bash - - steps: - - name: Checkout repository with submodules - uses: actions/checkout@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - submodules: recursive - persist-credentials: false - - - name: Sync submodule URLs - run: | - git submodule sync --recursive - - - name: Update submodules - run: | - git -c protocol.version=2 submodule update --init --remote --recursive --jobs 8 - - - name: Commit and push submodule updates - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -euo pipefail - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }} - # Stage only submodule pointer updates and .gitmodules - git add .gitmodules $(git config -f .gitmodules --get-regexp path | awk '{print $2}') || true - if git diff --cached --quiet; then - echo "No submodule pointer changes to commit" - exit 0 - fi - git commit -m "chore(submodules): auto-update pointers [skip ci]" - git push diff --git a/Dockerfile_hub b/Dockerfile_hub index f125c42..009cf84 100644 --- a/Dockerfile_hub +++ b/Dockerfile_hub @@ -93,7 +93,7 @@ RUN apt-get clean autoclean && apt-get autoremove --purge -y RUN pip3 install --no-cache-dir --upgrade pip # utils for jupyterhub -RUN pip3 install --no-cache-dir setuptools wheel virtualenv cython netifaces +RUN pip3 install --no-cache-dir setuptools wheel # jupyterhub stuff RUN pip3 install --no-cache-dir ipywidgets importlib_metadata jupyterhub-firstuseauthenticator dockerspawner jupyterhub-nativeauthenticator diff --git a/Dockerfile_singleuser b/Dockerfile_singleuser index 2aeb413..03e3509 100644 --- a/Dockerfile_singleuser +++ b/Dockerfile_singleuser @@ -213,12 +213,18 @@ RUN uv pip install --upgrade --system pip setuptools wheel # install the rest of the packages including medcat COPY ./requirements.txt /srv/jupyterhub/ +# https://download.pytorch.org/whl/cpu is out of date on packages, using alternative URL for CPU RUN if [ "$GPU_BUILD" = "true" ] && [ "$CPU_ARCHITECTURE" = "amd64" ]; then \ - uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt ; \ + uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt && \ + uv run python -m medcat download-scripts /srv/jupyterhub/medcat-scripts ; \ else \ - uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt ; \ + uv pip install --system --no-cache-dir -r /srv/jupyterhub/requirements.txt --index-url https://pypi.org/simple && \ + uv run python -m medcat download-scripts /srv/jupyterhub/medcat-scripts ; \ fi +# move notebooks +RUN mv /srv/jupyterhub/medcat-scripts/* /home/jovyan/work/. + ####################################################################################################### # install R and other dependencies diff --git a/requirements.txt b/requirements.txt index f5afabd..8e40572 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ wheel==0.45.1 +medcat==2.3.0 +# TODO: cogstack-es 8/9 handling virtualenv==20.31.2 ipywidgets==8.1.7 @@ -34,7 +36,7 @@ dataclasses==0.6 jsonpickle==4.1.0 jsonext==0.4.2 psycopg2==2.9.10 -psycopg2-binary==2.9.10 +psycopg2-binary>=2.9.10 pyodbc==5.2.0 openpyxl==3.1.5 dvc==3.59.2