Skip to content

Commit dee31ed

Browse files
committed
minor fixes
1 parent 753bc27 commit dee31ed

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

docker/Dockerfile

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
FROM python:3.13-alpine
1+
FROM python:3.13-slim-bookworm
22

33
WORKDIR /app
4-
ENV VIRTUAL_ENV=/app/venv
54

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 \
117
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 \
1512
libpq-dev \
1613
imagemagick \
14+
gcc \
1715
ghostscript \
18-
poppler-utils
16+
poppler-utils &&\
17+
rm -rf /var/lib/apt/lists/*
1918

2019
COPY poetry.lock pyproject.toml README.md LICENSE /app/
20+
COPY ocrworker/ /app/ocrworker/
2121

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
2424

25-
COPY ocrworker /app/ocrworker/
2625
COPY docker/entrypoint.sh /entrypoint.sh
2726
RUN chmod +x /entrypoint.sh
2827

docker/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ -z $CMD ]; then
88
fi
99

1010
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}
1212
}
1313

1414
case $CMD in

poetry.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ readme = "README.md"
77

88
[tool.poetry.dependencies]
99
python = "^3.13"
10-
ocrmypdf = "^16.3.1"
10+
ocrmypdf = "^16.6"
1111
ocrmypdf-papermerge = "0.7.1"
1212
celery = {extras = ["redis"], version = "^5.4.0"}
1313
sqlalchemy = "^2.0.30"

0 commit comments

Comments
 (0)