|
|
FROM python:3.10-slim |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y git-lfs && git lfs install |
|
|
RUN mkdir -p /data && chmod 777 /data |
|
|
ENV TRANSFORMERS_CACHE=/data/hf_cache |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
COPY requirements.txt . |
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
|
RUN python - <<'PY' |
|
|
from huggingface_hub import snapshot_download, hf_hub_download |
|
|
|
|
|
snapshot_download("BAAI/bge-base-en-v1.5") |
|
|
|
|
|
snapshot_download("samyakshrestha/merged-finetuned-mistral") |
|
|
|
|
|
hf_hub_download("samyakshrestha/merged-finetuned-mistral", |
|
|
"data/faiss_index/faiss_index.bin") |
|
|
hf_hub_download("samyakshrestha/merged-finetuned-mistral", |
|
|
"data/faiss_index/chunk_metadata.json") |
|
|
PY |
|
|
|
|
|
|
|
|
COPY . . |
|
|
|
|
|
EXPOSE 7860 |
|
|
CMD ["python", "app.py"] |