I’m using custom docker-compose to run rasa on VM(ubuntu-20.04), I’m getting error
PermissionError: [Errno 13] Permission denied: ‘models’
docker-compose file is in etc/rasa directory, I also did this command
sudo chgrp -R root /etc/rasa/* && sudo chmod -R 770 /etc/rasa/* but still get same error.
What am I missing?
FYI, model is trained already once docker image was built
@jpark2111 can you share the actual error screenshot from the docker logs ?
2022-01-31 19:29:46 WARNING rasa.utils.common - Failed to write global config. Error: [Errno 13] Permission denied: '/.config'. Skipping.
Traceback (most recent call last):
File "/usr/local/bin/rasa", line 8, in <module>
File "/usr/local/lib/python3.8/site-packages/rasa/__main__.py", line 118, in m ain
File "/usr/local/lib/python3.8/site-packages/rasa/cli/run.py", line 118, in ru n
args.model = _validate_model_path(args.model, "model", DEFAULT_MODELS_PATH)
File "/usr/local/lib/python3.8/site-packages/rasa/cli/run.py", line 71, in _va lidate_model_path
File "/usr/local/lib/python3.8/os.py", line 223, in makedirs
PermissionError: [Errno 13] Permission denied: 'models'
this message keeps repeating, as the docker container keeps restarting @nik202
@jpark2111 I know the solution but me confused, please share the all
docker-compose files and even
docker ps screenshots. Thanks.
This is used for Rasa X https://rasa.com/docs/rasa-x/0.42.x/installation-and-setup/install/docker-compose#4-configure
and you sharing me Rasa Open Source debug ?
Please clear me what are you trying to archive?
Confirm me please:
- Do you trying to run code using Rasa X ? OR
- Do you trying to run code using Rasa open-source with docker and docker-compose?
trying to run rasa open source with docker and docker-compose. @nik202
@jpark2111 Now make sense to me
Can you share the docker files please quickly?
COPY . /app
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
RUN python -m spacy download en_core_web_md
RUN python -m spacy link en_core_web_md en
RUN rasa train
CMD ["run", "--enable-api", "--port", "8080"]
@jpark2111 there is no rasa install and why are you using Python 3.8-slim if you are not creating any env?
For Demo use only:
COPY . /app
# WORKDIR /app
# COPY . /app
COPY ./data /app/data
RUN rasa train
CMD ["run","-m","/app/models","--enable-api","--cors","*","--debug" ,"--endpoints", "endpoints.yml", "--log-file", "out.log", "--debug"]
Try to update your docker file, take something from code
Just try to mention
USER root in your file and check. But, I have a doubt it will not run again.
Even, your run command doesn’t have the model and you also do not mount the model in the docker container, show how he will run the model?
The solution here is
USER root that’s why it shows Permission denied.
@jpark2111 For running completely code in docker and docker-compose for Rasa Open source please visit this thread: Dockerizing my rasa chatbot application that has botfront - #11 by nik202
If you still have some burning questions or doubt, you know I’m here Good Luck! I hope this will help you.