-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (24 loc) · 893 Bytes
/
Dockerfile
File metadata and controls
29 lines (24 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.11-slim
WORKDIR /app
# 1. Instalacja zależności systemowych
# - build-essential: do kompilacji niektórych bibliotek Python
# - tesseract-ocr: silnik OCR
# - tesseract-ocr-pol: język polski do OCR
# - tesseract-ocr-eng: język angielski do OCR
# - libgl1: biblioteka graficzna wymagana przez narzędzia do obróbki PDF/obrazów (często wymagana przez cv2 lub fitz)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
tesseract-ocr \
tesseract-ocr-pol \
tesseract-ocr-eng \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# 2. Kopiowanie requirements i instalacja bibliotek Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 3. Kopiowanie kodu
COPY . .
# 4. Wystawienie portu i start
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]