FROM python:3.10 as base # Set model ENV MODEL=matrixportal/Llama-3.1-8B-Instruct-GGUF ENV QUANT=q4_0 ENV CHAT_TEMPLATE=llama-3 # Set the working directory WORKDIR /app # Install Python requirements COPY ./requirements.txt /app/ RUN pip install --no-cache-dir --upgrade -r requirements.txt # Download model RUN MODEL_NAME_FILE=$(echo ${MODEL#*/} | sed 's/-GGUF$//') && \ wget https://huggingface.co/matrixportal/Llama-3.1-8B-Instruct-GGUF/resolve/main/llama-3.1-8b-instruct-q4_0.gguf -O model.gguf # Copy the rest of your application COPY . . # Command to run the application CMD ["python", "app.py"]