Spaces:
Sleeping
Sleeping
| # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
| # you will also find guides on how best to write your Dockerfile | |
| FROM python:3.10 | |
| ARG CACHE_BUST=2025-09-03-01 | |
| RUN echo "Cache bust: ${CACHE_BUST}" | |
| # Make sure subsequent RUNs execute as root | |
| USER root | |
| SHELL ["/bin/bash", "-lc"] | |
| # Fix/clean apt state, then install packages | |
| RUN rm -rf /var/lib/apt/lists/* \ | |
| && mkdir -p /var/lib/apt/lists/partial \ | |
| && apt-get update \ | |
| && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| git git-lfs ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN apt-get update && apt-get install -y --no-install-recommends tini && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Bring over your existing FastAPI + util, plus Streamlit UI and launcher | |
| COPY util.py app.py ui.py start.sh grounding_dino2.py /app/ | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/usr/bin/tini","--"] | |
| CMD ["bash","/app/start.sh"] | |