File size: 543 Bytes
fd33333
 
d396bd7
fd33333
 
c716155
 
 
6f75232
 
 
8b6199a
fd33333
8b6199a
fd33333
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.10-slim

# working directory
WORKDIR /code

ENV HF_HOME=/tmp/huggingface_cache
ENV TORCH_HOME=/tmp/torch_cache

RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
RUN mkdir -p $TORCH_HOME && chmod -R 777 $TORCH_HOME


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

COPY ./requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY . /code/

CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "app:app"]