getumbrel / llama-gpt

A self-hosted, offline, ChatGPT-like chatbot. Powered by Llama 2. 100% private, with no data leaving your device. New: Code Llama support!
https://apps.umbrel.com/app/llama-gpt
MIT License
10.53k stars 666 forks source link

docker compose: Permission denied running /api/run.sh #142

Closed roblem closed 6 months ago

roblem commented 6 months ago

Building the container using either

results in

Successfully tagged llama-gpt_llama-gpt-ui:latest
Recreating llama-gpt_llama-gpt-api_1 ... done
Recreating llama-gpt_llama-gpt-ui_1  ... done
Attaching to llama-gpt_llama-gpt-api_1, llama-gpt_llama-gpt-ui_1
llama-gpt-api_1  | /bin/sh: 0: cannot open /api/run.sh: Permission denied

The script continually tries to run /api/run.sh in the container and the permission issue persists. You have to control-c the build as it never finishes.

roblem commented 6 months ago

This is due to selinux. You need to set correct permissions on the various docker files or temporarily disable.

roblem commented 6 months ago

To fix it, append :z to the volume mounts in the compose files:

    volumes:
      - './models:/models:z'
      - './api:/api:z'

Then you don't have to disable selinux.