File size: 1,124 Bytes
252e766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4eb40e9
252e766
 
 
 
 
 
2cbce6f
252e766
1331f91
77e59d1
252e766
 
 
 
 
f4597b6
252e766
 
 
 
 
 
aba6135
252e766
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM python:3.8

RUN mkdir /app
RUN mkdir  /.cache/
RUN mkdir /.cache/matplotlib
RUN mkdir /.cache/huggingface
RUN mkdir /.cache/huggingface/hub/
RUN mkdir  /.cache/torch/
RUN mkdir /.config
RUN mkdir /.config/matplotlib/

RUN chmod -R 777 /.cache
RUN chmod -R 777 /.cache/matplotlib
RUN chmod -R 777 /.cache/huggingface/hub
RUN chmod -R 777 /.cache/torch
RUN chmod -R 777 /.config/
RUN chmod -R 777 /.config/matplotlib
RUN chmod -R 777 /app

RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y

COPY lama_cleaner ./lama_cleaner
COPY ./app.py ./app.py


COPY app/yolov8x-seg.pt /app
COPY app/big-lama.pt /app
# COPY clickseg_pplnet.pt /app
COPY app/u2net.onnx /app
#OPY u2net.onnx /tmp

RUN chmod -R a+r /app/yolov8x-seg.pt
RUN chmod -R a+r /app/big-lama.pt
#RUN chmod -R a+r /app/clickseg_pplnet.pt
RUN chmod -R a+r /app/u2net.onnx
#RUN chmod -R a+r /tmp/u2net.onnx


COPY ./requirements.txt ./requirements.txt
RUN pip install -r ./requirements.txt

RUN --mount=type=secret,id=SECRET,mode=0444,required=true \
  cat /run/secrets/SECRET > /test

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]