-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: 117503445 <[email protected]>
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
out | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime | ||
|
||
# RUN apt-get update && apt-get install gcc git ffmpeg libsm6 libxext6 -y | ||
# RUN pip uninstall numpy pillow -y | ||
# RUN pip install Pillow==9.1 | ||
# RUN python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.8/index.html | ||
# RUN pip install layoutparser pymupdf | ||
# COPY download.py /scripts/download.py | ||
# RUN python /scripts/download.py | ||
|
||
RUN pip install nougat-ocr[api] | ||
|
||
WORKDIR /workspace/nougat-demo | ||
|
||
ENTRYPOINT [ "bash" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3.9' | ||
services: | ||
nougat-demo-dev: | ||
build: | ||
# context: ./src/flow_pdf | ||
dockerfile: Dockerfile | ||
|
||
container_name: nougat-demo-dev | ||
# restart: unless-stopped | ||
volumes: | ||
- ./:/workspace/nougat-demo | ||
# - '${INPUT_PATH}:/workspace/nougat-demo/data/input' | ||
# - '${LAYOUT_PARSER_OUTPUT_PATH}:/workspace/nougat-demo/data/layout-parser-output' | ||
|
||
# - '${FLOWPDF_OUTPUT_PATH}:/workspace/nougat-demo/data/nougat-demo_output' | ||
|
||
# - './src/flow_pdf:/workspace/flow_pdf' | ||
# - './vsc_extensions/flow_pdf:/root/.vscode-server/extensions' | ||
ports: | ||
- '8503:8503' | ||
stdin_open: true | ||
tty: true | ||
deploy: | ||
# replicas: ${ENABLE_LAYOUT_PARSER} | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: 1 | ||
capabilities: [gpu] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pip install "nougat-ocr[api]" | ||
|
||
|
||
nougat hotstuff.pdf -o out -m 0.1.0-base --markdown | ||
nougat bitcoin.pdf -o out -m 0.1.0-base --markdown |