File size: 500 Bytes
d6100e5
 
 
 
 
 
678baaf
d6100e5
 
678baaf
 
 
 
 
d6100e5
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.10

WORKDIR /app

COPY . /app

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Pre-download models so they are cached in the image
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"

RUN python -c "from sentence_transformers import CrossEncoder; CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')"

EXPOSE 7860

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