0x81632/GGUF_API
0
1# Grab a fresh copy of the Python image2FROM python:3.10-slim3 4# Install build and runtime dependencies5RUN apt-get update && \6 apt-get install -y \7 libopenblas-dev \8 ninja-build \9 build-essential \10 pkg-config \11 curl12 13RUN pip install -U pip setuptools wheel && \14 CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" FORCE_CMAKE=1 pip install --verbose llama-cpp-python[server]15 16# Download model17RUN mkdir model && \18 curl -L https://huggingface.co/TheBloke/zephyr-7B-alpha-GGUF/resolve/main/zephyr-7b-alpha.Q4_K_M.gguf -o model/gguf-model.bin19 20COPY ./start_server.sh ./21COPY ./main.py ./22COPY ./index.html ./23 24# Make the server start script executable25RUN chmod +x ./start_server.sh26 27# Set environment variable for the host28ENV HOST=0.0.0.029ENV PORT=786030 31# Expose a port for the server32EXPOSE ${PORT}33 34# Run the server start script35CMD ["/bin/sh", "./start_server.sh"] 