File size: 613 Bytes
4e4bada
 
 
9baa8ab
4e4bada
 
 
 
781d379
9baa8ab
781d379
4e4bada
 
c373532
4e4bada
 
781d379
4e4bada
 
 
 
c373532
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.11-slim

RUN apt-get update && apt-get install -y \
    git ffmpeg libsm6 libxext6 libgl1 libsndfile1 \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY requirements.txt .

# Install tribev2 and all app dependencies
RUN pip install --no-cache-dir git+https://github.com/facebookresearch/tribev2.git
RUN pip install --no-cache-dir -r requirements.txt

# Non-root user (HuggingFace Spaces requirement)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user PATH=/usr/local/bin:/home/user/.local/bin:$PATH
WORKDIR /home/user/app
COPY --chown=user app.py .

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