File size: 1,050 Bytes
8b95053
 
 
10ae700
 
71fd7ae
8b95053
10ae700
 
7f01fcb
71fd7ae
 
 
 
 
 
 
 
 
 
 
8b95053
eee3392
8b95053
eee3392
8b95053
 
 
 
eee3392
8ec39b6
eee3392
 
 
8b95053
eee3392
 
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
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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"]