first (part 2: other directories)
Deploy Iddaai Backend / build-and-deploy (push) Failing after 18s

This commit is contained in:
2026-04-16 15:11:25 +03:00
parent 7814e0bc6b
commit 2f0b85a0c7
203 changed files with 59989 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
# --- AI Engine Dockerfile ---
# Python 3.11 with v20+ prediction stack (XGBoost + LightGBM)
FROM python:3.11-slim
WORKDIR /app
# System dependencies
RUN apt-get update && apt-get install -y \
gcc \
libpq-dev \
curl \
libgomp1 \
procps \
&& rm -rf /var/lib/apt/lists/*
# Python dependencies
# Install PyTorch CPU version separately to save space
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
# Copy requirements (without torch)
COPY requirements-docker.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create models directory
RUN mkdir -p /app/models
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health')" || exit 1
# Start FastAPI with uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]