File size: 619 Bytes
5ac8480
 
 
 
172d90f
5ac8480
 
 
0a534db
 
5ac8480
ac9cad9
 
eece98d
5ac8480
eece98d
7fe3c0a
5ac8480
 
 
 
 
 
 
 
 
 
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
FROM python:3.11-slim

WORKDIR /sebyahi

RUN apt-get update && apt-get install -y git ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt
RUN pip install pymongo 
RUN pip install certifi 
RUN camel_data -i defaults
RUN sed -i 's/torch.load(\(.*\))/torch.load(\1, weights_only=False)/g' \
    /usr/local/lib/python3.11/site-packages/supar/parser.py
COPY patch_supar.py . 

RUN python patch_supar.py 

COPY . .

RUN python camel_parser/download_models.py

EXPOSE 7860


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