Hello, my Hugging Face Space “SuhasGholkar/capsproj” is stuck on “Starting” even though the build succeeds. No errors appear in either the Build logs or Runtime logs. My own logging statements in app.py also do not show up.
I’ve attached my main files (app.py, Dockerfile) below. The app is a Streamlit application that:
-
Ensures an SQLite DB exists (downloads from Hub if missing).
-
Runs a chatbot UI with multiple tabs and MIS reporting.
-
Uses
openaifor model calls.
DocketFile Contents -
| # ---- Base image ---- |
|---|
| FROM python:3.10-slim |
| # Useful runtime env |
| ENV PYTHONDONTWRITEBYTECODE=1 \ |
| PYTHONUNBUFFERED=1 \ |
| PIP_NO_CACHE_DIR=1 |
| # ---- Workdir ---- |
| WORKDIR /app |
| # ---- Python deps ---- |
| COPY requirements.txt . |
| # Keep OS deps minimal (only if needed for some wheels) |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| && pip install --no-cache-dir -r requirements.txt \ |
| && apt-get purge -y --auto-remove \ |
| && rm -rf /var/lib/apt/lists/* |
| # ---- App code ---- |
| COPY . . |
| COPY olist.sqlite /tmp/olist.sqlite |
| # Streamlit & Matplotlib writable caches (mirrors the header you added in app.py) |
| ENV HOME=/app \ |
| XDG_CACHE_HOME=/app/.cache \ |
| MPLCONFIGDIR=/app/.mplconfig \ |
| STREAMLIT_SERVER_HEADLESS=true |
| RUN mkdir -p /app/.streamlit /app/.cache /app/.mplconfig |
| # (Optional) Streamlit server config – having this file in the repo also works |
| # RUN printf “[server]\nheadless = true\nport = 7860\naddress = \“0.0.0.0\”\nenableCORS = false\nenableXsrfProtection = false\n” > /app/.streamlit/config.toml |
| # ---- Network ---- |
| EXPOSE 7860 |
| # ---- Start ---- |
| CMD [“streamlit”, “run”, “app.py”, “–server.port=7860”, “–server.address=0.0.0.0”, “–server.enableCORS=false”] |
https://huggingface.co/spaces/SuhasGholkar/capsproj/resolve/main/app.py
Steps already tried:
-
Verified
requirements.txtcontains all imports (streamlit,pandas,matplotlib,dateparser,openai,huggingface_hub). -
Rebuilt Space.