Spaces:
Sleeping
Sleeping
File size: 615 Bytes
5c027f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 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"]
|