# Loading base. I'm using Debian, u can use whatever u want. FROM python:3.11.5-slim-bookworm # Just for sure everything will be fine. USER root # Installing gcc compiler and main library. RUN apt update && apt install gcc cmake build-essential -y RUN CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python # Copying files into folder and making it working dir. RUN mkdir app COPY . /app RUN chmod -R 777 /app WORKDIR /app # Making dir for translator model (facebook/m2m100_1.2B) RUN mkdir translator RUN chmod -R 777 translator # Installing wget and downloading model. RUN apt install wget -y RUN wget -q -O model.bin https://huggingface.co/TheBloke/WizardLM-1.0-Uncensored-Llama2-13B-GGUF/resolve/main/wizardlm-1.0-uncensored-llama2-13b.Q5_K_M.gguf RUN ls # 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". # Updating pip and installing everything from requirements RUN python3 -m pip install -U pip setuptools wheel RUN pip install --upgrade -r /app/requirements.txt # Now it's time to run Gradio app! CMD ["python", "gradio_app.py"]