-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 969 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (25 loc) · 969 Bytes
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
# Use official Python lightweight image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
# Create and set working directory
WORKDIR /app
# Install system dependencies (required for some math/plot libs, avoiding PyQt6 display errors in headless)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install python dependencies first (for docker layer caching)
COPY requirements.txt .
RUN pip install --upgrade pip
# Filter out PyQt6 from headless container if necessary, or just install everything
RUN pip install -r requirements.txt
# Copy the rest of the application
COPY . .
# Expose port for Streamlit Dashboard
EXPOSE 8501
# Default command: Run the Interactive Dashboard
CMD ["streamlit", "run", "dashboard/app.py", "--server.address=0.0.0.0", "--server.port=8501"]