-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.openshift
More file actions
56 lines (44 loc) · 1.52 KB
/
Dockerfile.openshift
File metadata and controls
56 lines (44 loc) · 1.52 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
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 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/
RUN mkdir -p /app/.streamlit && \
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
CMD ["streamlit", "run", "dashboard.py", \
"--server.port=8501", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--server.enableCORS=false", \
"--server.enableXsrfProtection=false"]