-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 810 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 810 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
COPY ./src /home/core/
RUN apt-get update && apt-get install -y curl git && \
groupadd --gid 2000 core && \
useradd --uid 2000 --gid core \
--home /home/core \
--create-home \
--shell /bin/bash core && \
pip install flask \
requests \
waitress \
python-dotenv \
langchain \
langchain-openai \
langchain-ollama && \
mkdir /home/core/persistence && \
chown core:core -R /home/core
RUN pip install git+https://github.com/amplec/utils
WORKDIR /home/core
USER core:core
EXPOSE 5000
HEALTHCHECK --interval=10s --timeout=5s --retries=3 CMD curl --fail http://localhost:5000/health || exit 1
CMD waitress-serve --port=5000 app:app