File size: 673 Bytes
a803331
 
 
 
 
 
 
 
 
 
 
08f5461
a803331
1fa8a29
a803331
 
 
 
 
1fa8a29
9522879
0def43d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10-slim

# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME

RUN apt update && apt install -y \
    libgl1-mesa-glx \
    libglib2.0-dev \
    git

RUN git clone https://github.com/LiteraturePro/MODNet.git && cp -r MODNet/* ./ && ls

RUN pip install --upgrade pip && pip install -r requirements.txt

# CPU
RUN pip install torch==1.13.0+cpu torchvision==0.14.0+cpu torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cpu


# CMD exec gunicorn --bind 0.0.0.0:7860 --workers 1 --threads 8 --timeout 0 app:app
# CMD exec gunicorn --bind 0.0.0.0:$PORT --workers 1 --threads 8 --timeout 0 app:app
CMD ["bash", "run.sh"]