From d7d82130d93da157f8827f70ecc09f28834baff7 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 22 Nov 2024 09:43:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A9(summary)=20dockerize=20FastAPI=20a?= =?UTF-8?q?pp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a minimal docker file to run the FastAPI server. --- src/summary/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/summary/Dockerfile diff --git a/src/summary/Dockerfile b/src/summary/Dockerfile new file mode 100644 index 00000000..36c5243b --- /dev/null +++ b/src/summary/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.12-slim AS builder + +WORKDIR /app + +COPY pyproject.toml . + +RUN pip3 install --no-cache-dir . + +FROM python:3.12-slim AS production + +WORKDIR /app + +COPY --from=builder /usr/local /usr/local +COPY ./summary /app/summary + + +CMD ["uvicorn", "summary.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]