File size: 684 Bytes
cb5d9d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.12-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PORT=8000 \
    HF_HUB_DISABLE_PROGRESS_BARS=0

WORKDIR /app

RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        git libglib2.0-0 libsm6 libxrender1 libxext6 libx11-6 libxcb1 libgl1 libgl1-mesa-dri \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt ./
RUN python -m pip install --upgrade pip \
    && python -m pip install -r requirements.txt

COPY . ./

RUN chmod +x entrypoint.sh

# /app/models is mounted as a volume so the SAM2 checkpoint persists across restarts
VOLUME ["/app/models"]

EXPOSE 8000

ENTRYPOINT ["./entrypoint.sh"]