Team Ai
Apppublic

cesarams/llama-cpp-api2

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile41 linesDownload Raw Back to root
1# Loading base. I'm using Alpine, u can use whatever u want.2FROM python:3.11.9-alpine3.203 4# Just for sure everything will be fine.5# ALSO ITS BAD! But since its docker, probably.. screw it?6USER root7 8# Installing gcc compiler and main library.9# ADICIONADO 'git' e 'cmake' PARA CORRIGIR O ERRO DE BUILD DO LLAMA-CPP-PYTHON10RUN apk update && apk add git cmake wget build-base python3-dev musl-dev linux-headers11RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python12 13# Copying files into folder and making it working dir.14RUN mkdir app15COPY . /app16RUN chmod -R 777 /app17WORKDIR /app18 19# Making dir for translator model (facebook/m2m100_1.2B)20RUN mkdir translator21RUN chmod -R 777 translator22 23# Installing wget and downloading model.24# ALTERADO PARA USAR O SEU MODELO ESPECIFICADO25ADD https://huggingface.co/Mungert/Gemma-3-Gaia-PT-BR-4b-it-GGUF/resolve/main/Gemma-3-Gaia-PT-BR-4b-it-q4_k_m.gguf /app/model.bin26RUN chmod -R 777 /app/model.bin27# You can use other models! Or u can comment this two RUNs and include in Space/repo/Docker image own model with name "model.bin".28 29# Fixing warnings from Transformers and Matplotlib30RUN mkdir -p /.cache/huggingface/hub -m 77731RUN mkdir -p /.config/matplotlib -m 77732RUN chmod -R 777 /.cache 33RUN chmod -R 777 /.config34 35# Updating pip and installing everything from requirements36RUN python3 -m pip install -U pip setuptools wheel37RUN pip install --upgrade -r /app/requirements.txt38 39# Now it's time to run Gradio app!40CMD ["python", "gradio_app.py"]41