Skip to content

Commit

Permalink
gpu?
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkosm committed Dec 26, 2024
1 parent f4b40b0 commit a443768
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 10 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y tzdata
# ENV TZ Asia/Tokyo

RUN apt-get update && \
apt-get install --yes --no-install-recommends curl g++ libopencv-dev python3.10 && \
apt-get install --yes --no-install-recommends curl g++ libopencv-dev python3.10 && python3-pip \
rm -rf /var/lib/apt/lists/*
RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION=${POETRY_VERSION} python3.10 -

Expand All @@ -24,12 +24,13 @@ RUN poetry config virtualenvs.create false && \
rm -rf /root/.cache/pypoetry && \
rm -rf /root/.cache/pip

#use paddlegpu
RUN pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu124/

COPY . ./
COPY magic-pdf.gpu.json /root/magic-pdf.json

RUN python3.10 download_models.py

RUN python3.10 download_models2.py


CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "3000"]
6 changes: 5 additions & 1 deletion download_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
"opendatalab/PDF-Extract-Kit-1.0",
local_dir="/root/PDF-Extract-Kit",
allow_patterns=mineru_patterns,
)
)

layoutreader_model_dir = snapshot_download(
"ppaanngggg/layoutreader", local_dir="/root/layoutreader"
)
5 changes: 0 additions & 5 deletions download_models2.py

This file was deleted.

50 changes: 49 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a443768

Please sign in to comment.