khini/OutreachAiChatbot
0
1FROM python:3.11-slim2 3# 1. Install system dependencies4RUN apt-get update && apt-get install -y \5 libgl1 \6 libglib2.0-0 \7 && rm -rf /var/lib/apt/lists/*8 9# 2. Setup user10RUN useradd -m -u 1000 user11USER user12ENV HOME=/home/user \13 PATH=/home/user/.local/bin:$PATH \14 # --- ADD THESE TWO LINES ---15 TF_USE_LEGACY_KERAS=1 \16 DEEPFACE_HOME=/home/user/app/.deepface17 18WORKDIR $HOME/app19 20# 3. Install dependencies21COPY --chown=user requirements.txt .22RUN pip install --no-cache-dir --upgrade pip && \23 pip install --no-cache-dir tf-keras==2.15.0 tensorflow==2.15.0 && \24 pip install --no-cache-dir -r requirements.txt25 26# 4. Copy app27COPY --chown=user . .28 29EXPOSE 786030CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]