Files
AI_portal/dwg-counting/Dockerfile
Ondřej Glaser 48cef99257 Initial portal commit: landing + 9 AI-powered apps
Apps:
- dwg-rooms: extract room numbers from DWG/DXF
- dwg-counting: count symbols in PDF drawings (OpenCV template matching)
- contract-check: review PDF contracts against a checklist (Claude vision + Tesseract OCR fallback)
- email-drafter: bullet notes → polished Czech/English business emails
- invoice-extractor: PDF/image invoice → structured data → Excel
- translator: Czech-first translator across 19 languages with tone control
- vv-check: find inconsistent unit prices across VV sheets in one workbook
- vv-compare: diff original vs new VV files (changes / added / removed)
- feature-request: portal users submit ideas + sample files

Infrastructure:
- LiteLLM gateway with per-app virtual keys + budgets
- Langfuse observability
- Geist font, shared theme, cross-subdomain back link + theme sync via cookie/URL
- Caddy reverse proxy on *.klas.chat
2026-05-13 15:25:04 +02:00

48 lines
1.2 KiB
Docker

# Stage 1: compile LibreDWG (provides dwgread for DWG → DXF conversion)
FROM debian:bookworm-slim AS libredwg-builder
RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
build-essential \
autoconf \
automake \
libtool \
python3 \
&& rm -rf /var/lib/apt/lists/*
COPY libredwg-0.12.5.tar.xz .
RUN tar xf libredwg-0.12.5.tar.xz \
&& cd libredwg-0.12.5 \
&& ./configure --prefix=/opt/libredwg --disable-shared --disable-bindings \
&& make -j"$(nproc)" \
&& make install \
&& cd .. \
&& rm -rf libredwg-0.12.5 libredwg-0.12.5.tar.xz
# Stage 2: runtime
FROM python:3.12-slim
COPY --from=libredwg-builder /opt/libredwg/bin/dwgread /usr/local/bin/dwgread
# poppler-utils for pdf2image; cairo + pango for cairosvg
RUN apt-get update && apt-get install -y --no-install-recommends \
poppler-utils \
libgl1 \
libcairo2 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /tmp/dwg-counting
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]