Spaces:
Runtime error
Runtime error
| FROM python:3.11-slim | |
| WORKDIR /app | |
| ENV PIP_NO_CACHE_DIR=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| # copy only what we need; fewer surprises | |
| COPY app.py app.py | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # ๐ Use *shell form* so $PORT expands; JSON form won't expand ${PORT} | |
| CMD bash -lc 'streamlit run app.py --server.address=0.0.0.0 --server.port ${PORT:-7860}' | |