-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.openshift
More file actions
64 lines (51 loc) · 1.8 KB
/
Dockerfile.openshift
File metadata and controls
64 lines (51 loc) · 1.8 KB
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
54
55
56
57
58
59
60
61
62
63
64
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy only necessary application files
COPY dashboard.py .
COPY dashboard_styles.py .
COPY mlperf_datacenter.py .
COPY llmd_dashboard.py .
COPY intelliconfig.py .
COPY consolidated_dashboard.csv .
COPY llmd-dashboard.csv .
# Copy all MLPerf data (version CSV files and dataset summaries)
COPY mlperf-data/ ./mlperf-data/
# Copy assets (logos, images, etc.)
COPY assets/ ./assets/
# Copy RHAIIS dataset summaries for Dataset Representation section
COPY datasets/summaries/ ./datasets/summaries/
COPY .streamlit/config.toml .streamlit/config.toml
RUN chgrp -R 0 /app && \
chmod -R g=u /app
# Expose port 8501
EXPOSE 8501
# Health check for OpenShift probes
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD curl -f http://localhost:8501/_stcore/health || exit 1
# Run as non-root
USER 1001
# Set environment variables and run the application
ENV STREAMLIT_CONFIG_PATH=/app/.streamlit
ENV STREAMLIT_SERVER_ENABLE_STATIC_SERVING=false
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_SERVER_MAX_UPLOAD_SIZE=200
ENV STREAMLIT_THEME_BASE=light
ENV STREAMLIT_THEME_PRIMARY_COLOR=#cc0000
ENV STREAMLIT_THEME_BACKGROUND_COLOR=#fafbfd
ENV STREAMLIT_THEME_SECONDARY_BACKGROUND_COLOR=#f0f2f6
ENV STREAMLIT_THEME_TEXT_COLOR=#1a1f36
ENV STREAMLIT_THEME_FONT=sans\ serif
CMD ["streamlit", "run", "dashboard.py", \
"--server.port=8501", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--server.enableCORS=false", \
"--server.enableXsrfProtection=false"]