Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| # ePyT loads the EPANET toolkit shared library; these keep it happy on slim. | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # HF Spaces run as uid 1000 / user "user". | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" \ | |
| HOME=/home/user \ | |
| PORT=7860 | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --user -r requirements.txt | |
| COPY --chown=user app.py smoke_test.py ./ | |
| COPY --chown=user networks ./networks | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |