File size: 447 Bytes
d2096ae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.10-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    git \
    git-lfs \
    libgl1 \
    libglib2.0-0 \
    && git lfs install \
    && rm -rf /var/lib/apt/lists/*

RUN --mount=type=secret,id=HF_TOKEN \
    --mount=type=secret,id=HF_REPO \
    git clone https://user:$(cat /run/secrets/HF_TOKEN)@huggingface.co/spaces/$(cat /run/secrets/HF_REPO).git .

RUN pip install -r requirements.txt

CMD ["python", "app.py"]