Added first working version of the code. Processes

PDF files, no upload yet.
This commit is contained in:
Christian Krakau-Louis
2025-02-11 19:42:23 +01:00
parent 22f8f60f12
commit 1ad9425102
17 changed files with 563 additions and 66 deletions
+9 -9
View File
@@ -1,29 +1,29 @@
# Stage 1: Build
# Stage 1: Build dependencies
FROM python:3.11 AS builder
WORKDIR /app
# Copy only dependency files first for better caching
COPY requirements.txt /app/
RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Stage 2: Final image
FROM python:3.11-slim
WORKDIR /app
# Copy installed dependencies from builder stage
# Copy installed dependencies
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
# Copy application files
COPY ./app /app
# Copy application files correctly
COPY ./app /app/app
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Set Python path explicitly
ENV PYTHONPATH=/app
# Expose API port
EXPOSE 8000
WORKDIR /app
# Default command
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]