File size: 1,035 Bytes
84fe70f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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"]