File size: 1,200 Bytes
242223f
 
3c64225
242223f
3c64225
 
242223f
3c64225
242223f
 
3c64225
 
242223f
 
3c64225
242223f
 
3c64225
242223f
 
 
 
 
 
 
e416b08
4d25818
 
 
 
25e263c
8d196c4
 
4d25818
0e158d3
242223f
4d25818
2f97700
242223f
4d25818
242223f
3c64225
 
242223f
 
 
 
 
 
3c64225
 
242223f
 
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
52
53
# Use Python 3.11 slim image for smaller size
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    gcc \
    g++ \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first for better caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Install additional dependencies for Hugging Face datasets
RUN pip install --no-cache-dir datasets huggingface_hub

# Copy application files
COPY streamlit_app.py .
COPY constants.py .
COPY vaill_logo.png .

# Copy backend modules
COPY user_management.py .
COPY huggingface_upload.py .
COPY update_streamlit_panel.py .
COPY update_data.py .
COPY data_updating_scripts ./data_updating_scripts

# Copy Streamlit pages
COPY pages/ ./pages/

# Copy data folder
COPY data/ ./data/


# Expose port
EXPOSE 8501

# Set environment variables
ENV PYTHONPATH=/app
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0

# Health check
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

# Run the app
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]