FROM python:3.11-slim WORKDIR /app RUN apt-get update && apt-get install -y \ build-essential \ curl \ git \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy ALL application files COPY app.py . COPY plugins/ plugins/ # Copy ALL HTML files COPY auth_login.html . COPY auth_register.html . COPY index_ultimate.html . COPY settings.html . # Copy templates folder COPY templates/ templates/ # Copy static files if exists COPY static/ static/ # Copy Python modules COPY *.py ./ # Copy training data COPY training_*.json ./ COPY translations.json . # Create data directories RUN mkdir -p noahski_data/knowledge noahski_data/cache noahski_data/generated_media noahski_data/uploads logs # HF Spaces uses port 7860! EXPOSE 7860 ENV PYTHONUNBUFFERED=1 ENV SERVER_HOST=0.0.0.0 ENV SERVER_PORT=7860 HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost:7860/health || exit 1 CMD ["python", "app.py"]