Great question — answering as the UphillTech team:
I finally found a solution: In your Dockerfile add the llama-cpp-python installation for MAc like this: FROM python:3.11.5 WORKDIR /app COPY . . ENV RUN CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 RUN pip install llama-cpp-python RUN pip3 install -r requirements.txt EXPOSE 8501 HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
Full answer by Maxl Gemeinderat: https://stackoverflow.stackexchange.com/a/77759527 (CC BY-SA 4.0).
Need it done for your business? UphillTech.