File tree 4 files changed +16
-17
lines changed
4 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.13-alpine
1
+ FROM python:3.13-slim-bookworm
2
2
3
3
WORKDIR /app
4
- ENV VIRTUAL_ENV=/app/venv
5
4
6
- RUN apk update && apk add linux-headers \
7
- python3-dev \
8
- gcc \
9
- libc-dev \
10
- libpq-dev \
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ build-essential \
11
7
tesseract-ocr \
12
- tesseract-ocr-data-deu \
13
- tesseract-ocr-data-spa \
14
- tesseract-ocr-data-ron \
8
+ tesseract-ocr-deu \
9
+ tesseract-ocr-spa \
10
+ tesseract-ocr-ron \
11
+ python3-dev \
15
12
libpq-dev \
16
13
imagemagick \
14
+ gcc \
17
15
ghostscript \
18
- poppler-utils
16
+ poppler-utils &&\
17
+ rm -rf /var/lib/apt/lists/*
19
18
20
19
COPY poetry.lock pyproject.toml README.md LICENSE /app/
20
+ COPY ocrworker/ /app/ocrworker/
21
21
22
- RUN pip install --upgrade poetry && \
23
- poetry install -E pg -v
22
+ RUN pip install --upgrade poetry
23
+ RUN poetry install -E pg -v
24
24
25
- COPY ocrworker /app/ocrworker/
26
25
COPY docker/entrypoint.sh /entrypoint.sh
27
26
RUN chmod +x /entrypoint.sh
28
27
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ if [ -z $CMD ]; then
8
8
fi
9
9
10
10
exec_worker () {
11
- cd /app && poetry run celery -A ocrworker.celery_app worker ${OCR_WORKER_ARGS}
11
+ exec poetry run celery -A ocrworker.celery_app worker ${OCR_WORKER_ARGS}
12
12
}
13
13
14
14
case $CMD in
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ readme = "README.md"
7
7
8
8
[tool .poetry .dependencies ]
9
9
python = " ^3.13"
10
- ocrmypdf = " ^16.3.1 "
10
+ ocrmypdf = " ^16.6 "
11
11
ocrmypdf-papermerge = " 0.7.1"
12
12
celery = {extras = [" redis" ], version = " ^5.4.0" }
13
13
sqlalchemy = " ^2.0.30"
You can’t perform that action at this time.
0 commit comments