/data folder permission issue when running on Linux
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, docker-compose, linux, ollama
- Domain
- databases, devops, infrastructure
Research direction
Start with the Linux profile and the /data volume configuration in docker-compose.yml, then reproduce with docker compose --profile linux up on Ubuntu. Check how the mounted folder is created and owned before the Neo4j database container starts; done means the database container starts without the /data permission error.
Written by the indexing model from the issue text.
Description
OS version: Ubuntu 20.04/22.04 on Azure, no gpu
Command I use: docker compose --profile linux up. Also set OLLAMA_BASE_URL=http://llm:11434 in .env
Got the error below
WARN[0000] The "LANGCHAIN_PROJECT" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_ACCESS_KEY_ID" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_SECRET_ACCESS_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_DEFAULT_REGION" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_PROJECT" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_ACCESS_KEY_ID" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_SECRET_ACCESS_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_DEFAULT_REGION" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_PROJECT" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_ACCESS_KEY_ID" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_SECRET_ACCESS_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_DEFAULT_REGION" variable is not set. Defaulting to a blank string.
WARN[0000] The "OPENAI_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "GOOGLE_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_PROJECT" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_ACCESS_KEY_ID" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_SECRET_ACCESS_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "AWS_DEFAULT_REGION" variable is not set. Defaulting to a blank string.
[+] Running 3/0
✔ Container genai-stack-pull-model-1 Created 0.0s
✔ Container genai-stack-llm-1 Running 0.0s
✔ Container genai-stack-database-1 Created 0.0s
Attaching to api-1, bot-1, database-1, front-end-1, llm-1, loader-1, pdf_bot-1, pull-model-1
pull-model-1 | pulling ollama model llama2 using http://llm:11434
llm-1 | [GIN] 2024/02/24 - 09:54:52 | 200 | 31.6µs | 172.18.0.4 | HEAD "/"
llm-1 | [GIN] 2024/02/24 - 09:54:52 | 200 | 595.703µs | 172.18.0.4 | POST "/api/show"
database-1 |
database-1 | Folder /data is not accessible for user: 7474 or group 7474. This is commonly a file permissions issue on the mounted folder.
database-1 |
database-1 | Hints to solve the issue:
database-1 | 1) Make sure the folder exists before mounting it. Docker will create the folder using root permissions before starting the Neo4j container. The root permissions disallow Neo4j from writing to the mounted folder.
database-1 | 2) Pass the folder owner's user ID and group ID to docker run, so that docker runs as that user.
database-1 | If the folder is owned by the current user, this can be done by adding this flag to your docker run command:
database-1 | --user=$(id -u):$(id -g)
database-1 |
pull-model-1 exited with code 0
database-1 exited with code 1
dependency failed to start: container genai-stack-database-1 exited (1)
Methods I've used:
- set
--user=$(id -u):$(id -g)as suggested - change the permission in the
/datafolder - set the user ID and group ID in
docker-compose.yml
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/genai-stack
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
docker/genai-stack#207 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
docker/genai-stack#205 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docker/genai-stack#203 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
docker/genai-stack#195 · 3 comments ·
-
Bot is unresponsive Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
docker/genai-stack#194 · 1 comment ·
All issues in docker/genai-stack
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100