-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 856 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (21 loc) · 856 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
FROM python:3.12-slim
WORKDIR /app
# Install runtime C++ OpenMP library for FAISS vector engine
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --prefer-binary -r requirements.txt
# Establish system user accounts for runtime hardening
RUN groupadd -g 10001 regugroup && \
useradd -u 10001 -g regugroup -m -s /bin/bash reguuser
# Copy codebase elements
COPY --chown=reguuser:regugroup main.py .
COPY --chown=reguuser:regugroup regudrift/ ./regudrift
# Ensure persistent workspace data mounts can be written by reguuser
RUN mkdir -p /app/data && chown -R reguuser:regugroup /app/data
USER reguuser
EXPOSE 8000
ENV PYTHONUNBUFFERED=1
CMD sh -c "uvicorn main:app --host 0.0.0.0 --port ${PORT:-8000}"