File size: 448 Bytes
1691f52
 
 
 
 
 
553dff4
 
 
1691f52
 
 
 
 
553dff4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM python:3.10-slim

WORKDIR /code

COPY requirements.txt .

RUN pip install --no-cache-dir --upgrade -r requirements.txt && \
    pip install huggingface_hub && \
    python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='sentence-transformers/all-MiniLM-L6-v2', local_dir='./all-MiniLM-L6-v2', local_dir_use_symlinks=False)"

COPY . .

EXPOSE 7860

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