Minor fixes

This commit is contained in:
Andras Schmelczer 2022-05-26 21:22:00 +02:00
parent 5cc96172af
commit ae9521bc29
No known key found for this signature in database
GPG key ID: 39260B5B0614A13E
12 changed files with 34 additions and 246 deletions

View file

@ -1,7 +1,9 @@
FROM python:3.8.12-slim-bullseye
FROM python:3.10.4-alpine3.16
ENV ENVIRONMENT production
ARG ENTRYPOINT main.py
WORKDIR /app
RUN apt-get update &&\
@ -9,17 +11,17 @@ RUN apt-get update &&\
rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir en-core-web-sm@https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.3.0/en_core_web_sm-3.3.0-py3-none-any.whl
COPY sus sus
RUN pip install --no-cache-dir --use-feature=in-tree-build ./sus
COPY great_ai great_ai
RUN pip install --no-cache-dir ./great_ai
COPY requirements.txt ./
RUN pip install --no-cache-dir --requirement requirements.txt
COPY . .
RUN rm -rf sus secrets
RUN rm -rf great_ai
EXPOSE 5000
EXPOSE 6060
HEALTHCHECK --interval=60s --timeout=60s --start-period=90s --retries=5 CMD [ "curl", "--fail", "http://localhost:5000/health" ]
HEALTHCHECK --interval=60s --timeout=60s --start-period=90s --retries=5 CMD [ "curl", "--fail", "http://localhost:6060/health" ]
CMD ["uvicorn", "main:app", "--proxy-headers", "--backlog", "8196", "--timeout-keep-alive", "900", "--host", "0.0.0.0", "--port", "5000"]
CMD ["great_ai", "$ENTRYPOINT"]

View file

@ -1,4 +1,4 @@
FROM python:3.8.12-slim-bullseye
FROM python:3.10.4-slim-bullseye
ENV ENVIRONMENT development