-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 928 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 928 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
30
31
32
FROM python:3.11-slim AS base
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
FROM base AS builder
COPY . /app
RUN cmake -S /app/dependencies/AES_Implementation \
-B /app/dependencies/AES_Implementation/build \
-DCMAKE_BUILD_TYPE=Release \
&& cmake --build /app/dependencies/AES_Implementation/build --config Release \
&& cmake --install /app/dependencies/AES_Implementation/build --prefix /usr/local
FROM python:3.11-slim AS runtime
WORKDIR /app
COPY --from=base /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local /usr/local
COPY --from=builder /app /app
EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]