All checks were successful
ENGIN CI / Build, test and smoke (push) Successful in 2m58s
31 lines
835 B
Docker
31 lines
835 B
Docker
ARG PYTHON_IMAGE=python:3.12-slim@sha256:7a8b475003c4fe15a2cd4e55e5cfc2f3560bdc9333d624f24cdd6d4340fd7a17
|
|
FROM ${PYTHON_IMAGE} AS base
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements-lock.txt ./
|
|
RUN pip install --no-cache-dir -r requirements-lock.txt
|
|
|
|
FROM base AS test
|
|
COPY . .
|
|
|
|
FROM base AS runtime
|
|
|
|
COPY app.py ./
|
|
COPY engin/ ./engin/
|
|
COPY assets/ ./assets/
|
|
COPY .streamlit/ ./.streamlit/
|
|
COPY artifacts/ ./artifacts/
|
|
COPY test.csv predictions.csv prediction_diagnostics.csv ./
|
|
|
|
EXPOSE 8501
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8501/_stcore/health', timeout=3)"
|
|
|
|
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"]
|