Skip to content

Commit

Permalink
Bump tabled version to 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyao9184 committed Nov 30, 2024
1 parent 6ac81f7 commit 7c7a1a9
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 46 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-image-tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
]
Expand Down
52 changes: 25 additions & 27 deletions cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down Expand Up @@ -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).

Expand All @@ -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
```
4 changes: 2 additions & 2 deletions docker/build@pypi/dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion docker/build@source/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docker/up@cpu-offline/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
ports:
Expand Down
5 changes: 2 additions & 3 deletions docker/up@gpu-offline/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
ports:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- pytorch==2.4.1
- pytorch-cuda==12.4

- streamlit==1.39.0
- streamlit==1.40.2

- pip:
- -e ./tabled
2 changes: 1 addition & 1 deletion tabled

0 comments on commit 7c7a1a9

Please sign in to comment.