File size: 1,223 Bytes
4058302
 
 
 
 
 
 
 
 
423c9d3
4058302
 
 
 
 
 
 
 
423c9d3
4058302
 
 
 
 
 
 
 
eb2d131
4058302
 
 
 
 
 
 
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
33
34
35
36
# syntax=docker/dockerfile:1.7
# -----------------------------------------------------------------------------
# Incident Command Center - OpenEnv server image
# -----------------------------------------------------------------------------
# Keeps the runtime image small (~150 MB) by installing only the server-side
# dependencies. Training dependencies ship via the top-level requirements.txt
# for Colab / local training.
# -----------------------------------------------------------------------------

FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1 \
    ENV_LOG_LEVEL=INFO \
    ENV_STRUCTURED_LOGGING=true

WORKDIR /app

RUN apt-get update \
    && apt-get install -y --no-install-recommends curl \
    && rm -rf /var/lib/apt/lists/*

COPY server/requirements.txt /app/server/requirements.txt
RUN pip install --upgrade pip && pip install -r /app/server/requirements.txt

COPY . /app

EXPOSE 8000

HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
  CMD curl -fsS http://127.0.0.1:8000/healthz || exit 1

CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "info"]