File size: 908 Bytes
1d8c2e0
0d74ab8
 
 
1d8c2e0
0d74ab8
 
 
 
 
 
1d8c2e0
0d74ab8
1d8c2e0
0d74ab8
1d8c2e0
 
 
 
0d74ab8
1d8c2e0
 
0d74ab8
1d8c2e0
 
0d74ab8
1d8c2e0
 
 
 
 
 
 
 
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
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements and install dependencies
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt

# Copy application files
COPY app.py ./
COPY backend/ ./backend/
COPY frontend/ ./frontend/

# Create data directory
RUN mkdir -p /app/data

# Create .streamlit directory and empty secrets file to avoid warnings
RUN mkdir -p /app/.streamlit && touch /app/.streamlit/secrets.toml

# Expose Streamlit port
EXPOSE 7860

# Health check for Hugging Face Spaces
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health

# Run the application
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]