Kek-bot / Dockerfile
Aleksandr Maiorov
v0.2.0
3e20bb6
raw
history blame
804 Bytes
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM ghcr.io/ggerganov/llama.cpp:server
ENV LLAMA_ARG_MODEL_URL=https://huggingface.co/Vikhrmodels/Vikhr-Qwen-2.5-1.5B-Instruct-GGUF/resolve/main/Vikhr-Qwen-2.5-1.5b-Instruct-Q8_0.gguf \
LLAMA_ARG_CTX_SIZE=4096 \
LLAMA_ARG_N_PARALLEL=2 \
LLAMA_ARG_ENDPOINT_METRICS=1 \
LLAMA_ARG_PORT=8080
RUN ./llama-server --host 0.0.0.0
WORKDIR /app
FROM python:3.11-slim as builder
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]