File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,15 @@ RUN apt-get update -q && \
1212
1313WORKDIR /app
1414
15+ # Force unbuffered Python output so logs appear immediately in HF Spaces
16+ ENV PYTHONUNBUFFERED=1
17+
1518# Install Python dependencies first (layer-cached unless requirements change)
1619COPY requirements-dashboard.txt requirements.txt
1720RUN pip install --no-cache-dir --upgrade pip && \
1821 pip install --no-cache-dir -r requirements.txt
1922
20- # Copy application code.
23+ # Copy application code
2124COPY app.py .
2225COPY scripts/ scripts/
2326
@@ -27,4 +30,4 @@ USER appuser
2730
2831EXPOSE 7860
2932
30- CMD ["python" , "app.py" ]
33+ CMD ["python" , "app.py" ]
Original file line number Diff line number Diff line change 1+ import sys
2+ sys .stdout = sys .__stdout__ # ensure unbuffered output in HF Spaces container
3+
14"""
25Environmental Monitoring Dashboard
36Dash app for Hugging Face Spaces — reads from S3 via DataReader.
You can’t perform that action at this time.
0 commit comments