Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN pip install --no-cache-dir huggingface_hub | |
| COPY . . | |
| # Download the database from HuggingFace dataset at build time | |
| RUN python -c "\ | |
| from huggingface_hub import hf_hub_download; \ | |
| hf_hub_download(\ | |
| repo_id='Arshdeep2k5/pharma-agent-db', \ | |
| filename='drugbank_lite.db', \ | |
| repo_type='dataset', \ | |
| local_dir='/app'\ | |
| ); \ | |
| print('Database downloaded.')" | |
| ENV DB_PATH=drugbank_lite.db | |
| ENV ENABLE_WEB_INTERFACE=true | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |