| |
| FROM python:3.10-slim |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| wget \ |
| curl \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN pip install --no-cache-dir \ |
| --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \ |
| llama-cpp-python==0.2.24 |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir --upgrade pip && \ |
| pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN wget --progress=bar:force:noscroll -O capybarahermes-2.5-mistral-7b.Q5_K_M.gguf \ |
| https://huggingface.co/TheBloke/CapybaraHermes-2.5-Mistral-7B-GGUF/resolve/main/capybarahermes-2.5-mistral-7b.Q5_K_M.gguf |
|
|
| |
| COPY api.py . |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|