RasaGPT
RasaGPT copied to clipboard
#8 3.476 ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/venv/lib/python3.10/site-packages/dotenv'
Hi, I need some help getting this running, been trying for the last couple of days without success.
Iยดll outline the steps Iยดve gone through and the fixes Iยดve applied.
- Im on Windows 10, so Iยดve made the changes suggested in the updated "Readme", changing the image to rasa/rasa:latest in the "docker-compose" and the "Dockerfile" in "app/api". This solves the "service api declares mutually exclusive
network_mode
andnetworks
: invalid compose project" as a result of running "make install" - Running "make install" here results in the following error: "Error response from daemon: Container f961d9eb78d99976626287f9cbe674c75ddb4104292be40a2df2cf504cb4e35b is not running". The "chat_rasa_core" image is shut down after startup while the other images are running. In Docker logs of "chat_rasa_core" this message shows: "chmod: changing permissions of '/app/wait-for-it.sh': Operation not permitted". I tried to resolve this by changing this line in the "docker-compose"-file:
entrypoint: ["/bin/bash", "-c", "chmod +x /app/wait-for-it.sh && /app/wait-for-it.sh rasa-credentials:8889 -t 120 -o && rasa run --enable-api --cors '*' --debug --credentials /app/credentials.yml --endpoints /app/endpoints.yml --model /app/models"]
to:
entrypoint: ["/bin/bash", "-c", "/app/wait-for-it.sh rasa-credentials:8889 -t 120 -o && rasa run --enable-api --cors '*' --debug --credentials /app/credentials.yml --endpoints /app/endpoints.yml --model /app/models"]
I also go to the RasaGPT/app/scripts directory via Git Bash and run "chmod +x /wait-for-it.sh"
Apart from this, I also need to change the "EOL Conversion" to "Unix (LF)" of the "wait-for-it.sh" file in app/scripts.
I also made the changes in docker-compose suggested here: https://github.com/PythonicNinja/RasaGPT/commit/f899209d01615507a6e9f2aec6cd4d4877d02dea
All in all, this is my docker-compose file: `# -------------------------------------
โโโโโ โโโโ โโโ โโโโ โโโโโ โโโโโ โโโโโ
โโโโโ โโโโ โโโ โโโโ โโโโโ โโโโโ โโโโโ
โโโโโ โโโโ โโโ โโโโ โโโโโ โโโโโ โโโโโ
+-----------------------------------+
| http://RasaGPT.dev by @paulpierre |
+-----------------------------------+
version: '3.9'
services:
-------------------
API service for LLM
-------------------
api: build: context: ./app/api restart: always container_name: chat_api env_file: - .env ports: - 8888:8888 healthcheck: test: ["CMD", "curl", "-f", "http://api:8888/health"] interval: 15s retries: 5 depends_on: - db networks: - chat-network volumes: - ./app/scripts/wait-for-it.sh:/app/api/wait-for-it.sh - ./app/api:/app/api
-------------------
Ngrok agent service
-------------------
ngrok: image: ngrok/ngrok:latest container_name: chat_ngrok ports: - 4040:4040 env_file: - .env environment: NGROK_CONFIG: /etc/ngrok.yml NGROK_AUTH_TOKEN: ${NGROK_AUTH_TOKEN:-} NGROK_DEBUG: ${NGROK_DEBUG:-true} NGROK_API_KEY: ${NGROK_API_KEY:-} networks: - chat-network volumes: - ./app/rasa/ngrok.yml:/etc/ngrok.yml restart: unless-stopped
-----------------
Core Rasa service
-----------------
rasa-core: image: rasa/rasa:latest container_name: chat_rasa_core env_file: - .env volumes: - ./app/rasa:/app - ./app/scripts/wait-for-it.sh:/app/wait-for-it.sh
ports:
- 5005:5005
entrypoint: ["/bin/bash", "-c", "/app/wait-for-it.sh rasa-credentials:8889 -t 120 -o && rasa run --enable-api --cors '*' --debug --credentials /app/credentials.yml --endpoints /app/endpoints.yml --model /app/models"]
networks:
- chat-network
depends_on:
- rasa-actions
- rasa-credentials
--------------------
Rasa actions service
--------------------
rasa-actions: build: context: ./app/rasa dockerfile: ./actions/Dockerfile container_name: chat_rasa_actions env_file: - .env ports: - 5055:5055 depends_on: - rasa-credentials networks: - chat-network
-------------------------------
Rasa credentials helper service
-------------------------------
rasa-credentials: build: context: ./app/rasa-credentials dockerfile: Dockerfile container_name: chat_rasa_credentials volumes: - ./app/rasa:/app/rasa - ./app/rasa-credentials:/app/rasa-credentials ports: - 8889:8889 env_file: - .env networks: - chat-network healthcheck: test: ["CMD", "curl", "-f", "http://rasa-credentials:8889"] interval: 15s retries: 5
-------------------------
Postgres database service
-------------------------
db: build: context: ./app/db container_name: chat_db env_file: - .env environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} volumes: - ./mnt/db:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD", "pg_isready", "-U", "postgres"] interval: 5s retries: 5 networks: - chat-network
--------------------------------
PgAdmin database browser service
--------------------------------
pgadmin: container_name: chat_pgadmin image: dpage/pgadmin4 environment: PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]} PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} PGADMIN_CONFIG_SERVER_MODE: 'False' volumes: - ./mnt/pgadmin:/var/lib/pgadmin ports: - "${PGADMIN_PORT:-5050}:80" restart: unless-stopped depends_on: - db networks: - chat-network
----------------------------
Container log viewer service
----------------------------
dozzle: container_name: chat_dozzle image: amir20/dozzle:latest volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 9999:8080 depends_on: - db
networks: chat-network: driver: bridge`
When running "make install" after these changes, the "chat_rasa_core" stays open without any errors.
- Instead this error comes up: "#5 CANCELED failed to solve: process "/bin/bash -o pipefail -c pip install python-dotenv rasa-sdk requests" did not complete successfully: exit code:1"
#8 3.476 ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/opt/venv/lib/python3.10/site-packages/dotenv'
This error i can not get around. It seems to arise when the "requirements.txt" in app/api is ran. Iยดve tried manually installing it via the terminal in Docker, getting the same response. Iยดve also tried modifying the "Dockerfile" in app/api to give it root privileges, like this:
USER root RUN pip install --no-cache-dir -r requirements.txt
Still the same error. I would very much appreciate some help in getting further!
Also getting this issue, across 3 different linux environments.
I'm working on CentOS7.6. The below command works for me.
#add user:root to all in docker-compose.yml and app/rasa/actions/Dockerfile, then mkdir -p /app/rasa/.rasa/ sudo chmod -R 777 ./app/rasa/.rasa/ make install make run
I solved this issue by adding USER root
in the Dockerfile.
Hope this also can help you.