Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
roblem opened this issue Dec 21, 2023 · 2 comments
Closed

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

roblem opened this issue Dec 21, 2023 · 2 comments

Comments

@roblem
Copy link

roblem commented Dec 21, 2023

Building the container using either

  • run.sh --model 7b (it doesn't matter what model you specify, the issue exists), or
  • docker-compose -f docker-compose-gguf.yml up --build

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
Copy link
Author

roblem commented Dec 21, 2023

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

@roblem roblem closed this as completed Dec 21, 2023
@roblem
Copy link
Author

roblem commented Dec 21, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant