File size: 603 Bytes
6f71b05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.10

RUN apt-get update && apt-get install -y \
    git \
    git-lfs \
    ffmpeg \
    libsm6 \
    libxext6 \
    cmake \
    rsync \
    libgl1 \
    libegl1 \
    libopengl0 \
 && rm -rf /var/lib/apt/lists/* \
 && git lfs install

WORKDIR /home/user/app

COPY . .

RUN pip install --no-cache-dir -r requirements.txt


ENV XDG_CACHE_HOME=/home/user/.cache
ENV TRANSFORMERS_CACHE=/home/user/.cache/huggingface/transformers
ENV HF_HOME=/home/user/.cache/huggingface
RUN mkdir -p /home/user/.cache/huggingface/transformers && chown -R 1000:1000 /home/user/.cache

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