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"]