From 1ee06c107cd4de0a86d5025ddb93ca794560bb16 Mon Sep 17 00:00:00 2001 From: xiaoyao9184 <6614349+xiaoyao9184@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:56:22 +0800 Subject: [PATCH] Bump tabled version to 0.1.5 --- .../workflows/docker-image-tag-version.yml | 8 +-- .vscode/launch.json | 2 +- .vscode/tasks.json | 6 +-- cache/README.md | 52 +++++++++---------- docker/build@pypi/dockerfile | 4 +- docker/build@source/dockerfile | 2 +- docker/up@cpu-offline/docker-compose.yml | 5 +- docker/up@gpu-offline/docker-compose.yml | 5 +- environment.yml | 2 +- tabled | 2 +- 10 files changed, 42 insertions(+), 46 deletions(-) diff --git a/.github/workflows/docker-image-tag-version.yml b/.github/workflows/docker-image-tag-version.yml index fe3b563..af119cc 100644 --- a/.github/workflows/docker-image-tag-version.yml +++ b/.github/workflows/docker-image-tag-version.yml @@ -13,11 +13,11 @@ on: tabled_version: description: tabled version of pypi required: true - default: 0.1.4 + default: 0.1.5 streamlit_version: description: streamlit version of pypi required: true - default: 1.39.0 + default: 1.40.2 jobs: build-and-push-docker-image: @@ -29,9 +29,9 @@ jobs: strategy: matrix: TABLED_VERSION: - - ${{ github.event.inputs.tabled_version || '0.1.4' }} + - ${{ github.event.inputs.tabled_version || '0.1.5' }} STREAMLIT_VERSION: - - ${{ github.event.inputs.streamlit_version || '1.39.0' }} + - ${{ github.event.inputs.streamlit_version || '1.40.2' }} platform: - linux/amd64 diff --git a/.vscode/launch.json b/.vscode/launch.json index 298b3b4..8e90727 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,7 +33,7 @@ "XDG_CACHE_HOME": "${workspaceFolder}/cache", "HF_HUB_OFFLINE": "true", "DETECTOR_MODEL_CHECKPOINT": "${workspaceFolder}/cache/huggingface/hub/models--vikp--surya_det3/snapshots/467ee9ec33e6e6c5f73e57dbc1415b14032f5b95", - "LAYOUT_MODEL_CHECKPOINT": "${workspaceFolder}/cache/huggingface/hub/models--vikp--surya_layout3/snapshots/6f4c319b213ddbe736c9fe6de87ad7dc3bbb0a1e", + "LAYOUT_MODEL_CHECKPOINT": "${workspaceFolder}/cache/huggingface/hub/models--datalab-to--surya_layout0/snapshots/421ac206a400227ea714d47a405e53ce74374957", "TABLE_REC_MODEL_CHECKPOINT": "${workspaceFolder}/cache/huggingface/hub/models--vikp--surya_tablerec/snapshots/8bca165f81e9cee5fb382413eb23175079917d14", "RECOGNITION_MODEL_CHECKPOINT": "${workspaceFolder}/cache/huggingface/hub/models--vikp--surya_rec2/snapshots/6611509b2c3a32c141703ce19adc899d9d0abf41", }, diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e5f0ec4..d1cdaed 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -15,9 +15,9 @@ "command": "docker build -t xiaoyao9184/tabled:master -f ./docker/build@source/dockerfile ." }, { - "label": "docker: build 0.1.4", + "label": "docker: build 0.1.5", "type": "shell", - "command": "docker build -t xiaoyao9184/tabled:0.1.4 -f ./docker/build@pypi/dockerfile ." + "command": "docker build -t xiaoyao9184/tabled:0.1.5 -f ./docker/build@pypi/dockerfile ." }, { "label": "huggingface-cli: download models", @@ -32,7 +32,7 @@ }, "command": [ "huggingface-cli download vikp/surya_det3 --revision main --cache-dir ./cache/huggingface/hub", - "&& huggingface-cli download vikp/surya_layout3 --revision main --cache-dir ./cache/huggingface/hub", + "&& huggingface-cli download datalab-to/surya_layout0 --revision main --cache-dir ./cache/huggingface/hub", "&& huggingface-cli download vikp/surya_tablerec --revision main --cache-dir ./cache/huggingface/hub", "&& huggingface-cli download vikp/surya_rec2 --revision main --cache-dir ./cache/huggingface/hub", ] diff --git a/cache/README.md b/cache/README.md index c6bd305..122e21f 100644 --- a/cache/README.md +++ b/cache/README.md @@ -32,31 +32,6 @@ The folder structure for `./cache/huggingface/hub/models--vikp--surya_det3` is a 4 directories, 13 files ``` -and `./cache/huggingface/hub/models--vikp--surya_layout3` like this - -``` -. -├── blobs -│ ├── 0a51f931c62cfc4a56f9afdaedfa96336b040a47 -│ ├── 26e1ccb624958982ad55191648d53f9610cfce83b5bd9a227804a62bf3446639 -│ ├── 2cd406fa7808c997daa69ef095b1992f243dadd7 -│ ├── 64a74e7f804289d76c13f7aab35ad32c6071ccb41db04d8626909c84063971b4 -│ ├── a6344aac8c09253b3b630fb776ae94478aa0275b -│ └── afaa751c9f40e9df6796a7c2f3d7a9a2159ccae0 -├── refs -│ └── main -└── snapshots - └── 6f4c319b213ddbe736c9fe6de87ad7dc3bbb0a1e - ├── config.json -> ../../blobs/afaa751c9f40e9df6796a7c2f3d7a9a2159ccae0 - ├── .gitattributes -> ../../blobs/a6344aac8c09253b3b630fb776ae94478aa0275b - ├── model.safetensors -> ../../blobs/64a74e7f804289d76c13f7aab35ad32c6071ccb41db04d8626909c84063971b4 - ├── preprocessor_config.json -> ../../blobs/2cd406fa7808c997daa69ef095b1992f243dadd7 - ├── README.md -> ../../blobs/0a51f931c62cfc4a56f9afdaedfa96336b040a47 - └── training_args.bin -> ../../blobs/26e1ccb624958982ad55191648d53f9610cfce83b5bd9a227804a62bf3446639 - -4 directories, 13 files -``` - and `./cache/huggingface/hub/models--vikp--surya_rec2` like this ``` @@ -119,11 +94,34 @@ and `./cache/huggingface/hub/models--vikp--surya_tablerec` like this 4 directories, 19 files ``` +and `./cache/huggingface/hubmodels--datalab-to--surya_layout0` like this + + +``` +. +├── blobs +│ ├── 15a199bdf136c1ae9f4249308032f67bc0ef74e6770db2a87f55f72503914e00 +│ ├── 6284a0fcdd550cdae76a90177664e8f34cf7a8cc +│ ├── 776774696986893ca5eb478899ea9d06c20435c5 +│ ├── a6344aac8c09253b3b630fb776ae94478aa0275b +│ └── e389089e7f1b85048e6dc1a9f84b51982c04b9f0 +├── refs +│ └── main +└── snapshots + └── 421ac206a400227ea714d47a405e53ce74374957 + ├── config.json -> ../../blobs/e389089e7f1b85048e6dc1a9f84b51982c04b9f0 + ├── model.safetensors -> ../../blobs/15a199bdf136c1ae9f4249308032f67bc0ef74e6770db2a87f55f72503914e00 + ├── preprocessor_config.json -> ../../blobs/776774696986893ca5eb478899ea9d06c20435c5 + └── README.md -> ../../blobs/6284a0fcdd550cdae76a90177664e8f34cf7a8cc + +4 directories, 10 files +``` + It will use - `./cache/huggingface/hub/models--vikp--surya_det3/snapshots/467ee9ec33e6e6c5f73e57dbc1415b14032f5b95` -- `./cache/huggingface/hub/models--vikp--surya_layout3/snapshots/6f4c319b213ddbe736c9fe6de87ad7dc3bbb0a1e` - `./cache/huggingface/hub/models--vikp--surya_rec2/snapshots/6611509b2c3a32c141703ce19adc899d9d0abf41` - `./cache/huggingface/hub/models--vikp--surya_tablerec/snapshots/8bca165f81e9cee5fb382413eb23175079917d14` +- `./cache/huggingface/hub/hubmodels--datalab-to--surya_layout0/snapshots/421ac206a400227ea714d47a405e53ce74374957` For more details, refer to [up@cpu-offline/docker-compose.yml](./../docker/up@cpu-offline/docker-compose.yml). @@ -142,7 +140,7 @@ download model ```bash huggingface-cli download vikp/surya_det3 --repo-type model --revision main --cache-dir ./cache/huggingface/hub -huggingface-cli download vikp/surya_layout3 --repo-type model --revision main --cache-dir ./cache/huggingface/hub huggingface-cli download vikp/surya_rec2 --repo-type model --revision main --cache-dir ./cache/huggingface/hub huggingface-cli download vikp/surya_tablerec --repo-type model --revision main --cache-dir ./cache/huggingface/hub +huggingface-cli download datalab-to/surya_layout0 --revision main --cache-dir ./cache/huggingface/hub ``` \ No newline at end of file diff --git a/docker/build@pypi/dockerfile b/docker/build@pypi/dockerfile index f3f2b0c..45bc6e6 100644 --- a/docker/build@pypi/dockerfile +++ b/docker/build@pypi/dockerfile @@ -1,5 +1,5 @@ -ARG TABLED_VERSION=0.1.4 -ARG STREAMLIT_VERSION=1.39.0 +ARG TABLED_VERSION=0.1.5 +ARG STREAMLIT_VERSION=1.40.2 FROM pytorch/pytorch:2.4.1-cuda12.4-cudnn9-runtime diff --git a/docker/build@source/dockerfile b/docker/build@source/dockerfile index fbccf2a..437b8a4 100644 --- a/docker/build@source/dockerfile +++ b/docker/build@source/dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y \ RUN pip3 install --upgrade pip COPY ./tabled /app -RUN pip3 install --no-cache-dir -e . "streamlit==1.39.0" +RUN pip3 install --no-cache-dir -e . "streamlit==1.40.2" # The image is too large, with layers exceeding 10GB. # RUN pip3 install poetry # RUN poetry install --no-root --with dev diff --git a/docker/up@cpu-offline/docker-compose.yml b/docker/up@cpu-offline/docker-compose.yml index 20a26a1..4640d21 100644 --- a/docker/up@cpu-offline/docker-compose.yml +++ b/docker/up@cpu-offline/docker-compose.yml @@ -2,14 +2,13 @@ services: tabled_app: - image: xiaoyao9184/tabled:0.1.4 + image: xiaoyao9184/tabled:0.1.5 container_name: tabled_pdf_app environment: - TORCH_DEVICE=cpu - HF_HUB_OFFLINE=true - DETECTOR_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_det3/snapshots/467ee9ec33e6e6c5f73e57dbc1415b14032f5b95 - - LAYOUT_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_layout3/snapshots/6f4c319b213ddbe736c9fe6de87ad7dc3bbb0a1e - - ORDER_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_order/snapshots/7b727d0a2c942cdc8596d186115f65c12c812bd8 + - LAYOUT_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--datalab-to--surya_layout0/snapshots/421ac206a400227ea714d47a405e53ce74374957 - RECOGNITION_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_rec2/snapshots/6611509b2c3a32c141703ce19adc899d9d0abf41 - TABLE_REC_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_tablerec/snapshots/8bca165f81e9cee5fb382413eb23175079917d14 - TEXIFY_MODEL_NAME=/root/.cache/huggingface/hub/models--vikp--texify/snapshots/ce49c1fe10842e78b8be61f9e762b85ac952807d diff --git a/docker/up@gpu-offline/docker-compose.yml b/docker/up@gpu-offline/docker-compose.yml index c0c11c2..c36f661 100644 --- a/docker/up@gpu-offline/docker-compose.yml +++ b/docker/up@gpu-offline/docker-compose.yml @@ -2,14 +2,13 @@ services: tabled_app: - image: xiaoyao9184/tabled:0.1.4 + image: xiaoyao9184/tabled:0.1.5 container_name: tabled_pdf_app environment: - TORCH_DEVICE=cuda - HF_HUB_OFFLINE=true - DETECTOR_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_det3/snapshots/467ee9ec33e6e6c5f73e57dbc1415b14032f5b95 - - LAYOUT_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_layout3/snapshots/6f4c319b213ddbe736c9fe6de87ad7dc3bbb0a1e - - ORDER_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_order/snapshots/7b727d0a2c942cdc8596d186115f65c12c812bd8 + - LAYOUT_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--datalab-to--surya_layout0/snapshots/421ac206a400227ea714d47a405e53ce74374957 - RECOGNITION_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_rec2/snapshots/6611509b2c3a32c141703ce19adc899d9d0abf41 - TABLE_REC_MODEL_CHECKPOINT=/root/.cache/huggingface/hub/models--vikp--surya_tablerec/snapshots/8bca165f81e9cee5fb382413eb23175079917d14 - TEXIFY_MODEL_NAME=/root/.cache/huggingface/hub/models--vikp--texify/snapshots/ce49c1fe10842e78b8be61f9e762b85ac952807d diff --git a/environment.yml b/environment.yml index ec07d39..06e4c40 100644 --- a/environment.yml +++ b/environment.yml @@ -11,7 +11,7 @@ dependencies: - pytorch==2.4.1 - pytorch-cuda==12.4 - - streamlit==1.39.0 + - streamlit==1.40.2 - pip: - -e ./tabled diff --git a/tabled b/tabled index 441936c..9244e08 160000 --- a/tabled +++ b/tabled @@ -1 +1 @@ -Subproject commit 441936c1173cdda9c19bcd6066c16143192077f4 +Subproject commit 9244e08d8de7275ebf93c51e0b901f476443762f