Spaces:
Sleeping
Sleeping
Download Dockerfile from Beledevere/GridSenseAI-Hackathon: direct link, hf CLI and curl.
- Browser
- Download file 763 Bytes
-
https://huggingface.co/spaces/Beledevere/GridSenseAI-Hackathon/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Beledevere/GridSenseAI-Hackathon/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Beledevere/GridSenseAI-Hackathon/resolve/main/Dockerfile
763 Bytes
| FROM python:3.12-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONPATH=/app/src | |
| WORKDIR /app | |
| # Install system dependencies (minimal, safe ones) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgl1 \ | |
| libgomp1 \ | |
| libhdf5-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --root-user-action=ignore -r requirements.txt | |
| # Create non-root user for HF Spaces | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy application code | |
| COPY --chown=user . . | |
| EXPOSE 7860 | |
| CMD ["streamlit", "run", "dashboard/app.py", "--server.port", "7860", "--server.address", "0.0.0.0"] | |