question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot train model in docker on centOS; models folder not created (silent failure)

See original GitHub issue

Rasa version: using docker-full-latest

Operating system (windows, osx, …): CentOS Linux 7 (Core)

Issue: I’m trying to deploy my locally trained model to remote server using docker to run the pretrained model from local machine.

Error (including full traceback):

Command:

$ sudo docker run -v $(pwd):/app rasa/rasa init --no-prompt

Traceback:

Warning: Output is not to a terminal (fd=1).
Warning: Input is not to a terminal (fd=0).
Welcome to Rasa! 🤖

To get started quickly, an initial project will be created.
If you need some help, check out the documentation at https://rasa.com/docs/rasa.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/distutils/file_util.py", line 41, in _copy_file_contents
    fdst = open(dst, 'wb')
PermissionError: [Errno 13] Permission denied: './__init__.py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/build/bin/rasa", line 11, in <module>
    load_entry_point('rasa==1.5.0a1', 'console_scripts', 'rasa')()
  File "/build/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
    cmdline_arguments.func(cmdline_arguments)
  File "/build/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 195, in run
    init_project(args, path)
  File "/build/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 111, in init_project
    create_initial_project(path)
  File "/build/lib/python3.6/site-packages/rasa/cli/scaffold.py", line 119, in create_initial_project
    copy_tree(scaffold_path(), path)
  File "/usr/local/lib/python3.6/distutils/dir_util.py", line 163, in copy_tree
    dry_run=dry_run)
  File "/usr/local/lib/python3.6/distutils/file_util.py", line 151, in copy_file
    _copy_file_contents(src, dst)
  File "/usr/local/lib/python3.6/distutils/file_util.py", line 44, in _copy_file_contents
    "could not create '%s': %s" % (dst, e.strerror))
distutils.errors.DistutilsFileError: could not create './__init__.py': Permission denied

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
sunchuanjiacommented, Nov 21, 2019

replacedocker run -v $(pwd):/app rasa/rasa init --no-prompt with docker run -v myrasa:/app rasa/rasa init --no-prompt ,then it will create a dir at /www/server/docker/volumes,it works.

1reaction
erohmensingcommented, Feb 24, 2020

Hi everyone, for this command, that creates new files and directories, the user (1001) apparently does not have permission to create these files in the local directory.

If you already have models, you don’t need to use rasa init to deploy a model. If you are creating a new one, you can use the -u flag to let this one command act as root to create files.

docker run -v $(pwd):/app -u root rasa/rasa init --no-prompt

Plan to clear this up in the documentation 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot execute RUN mkdir in a Dockerfile - Stack Overflow
The problem is that /var/www doesn't exist either, and mkdir isn't recursive by default -- it expects the immediate parent directory to exist....
Read more >
Serving Machine Learning Models With Docker: 5 Mistakes ...
Mistake 5: Not monitoring model versions when serving ML models with Docker. One operational mistake data scientists make is not tracking changes or...
Read more >
docker service create - Docker Documentation
docker service create: Creates a service as described by the specified parameters. ... An error is produced if the file or directory does...
Read more >
GitLab Docker images
The directory ownership and permissions cannot be changed without remounting, and GitLab fails. Our recommendation is to switch to using the native Docker...
Read more >
Using Your GPU in a Docker Container - Roboflow Blog
Follow this step-by-step guide to get started. ... Error: Docker does not find Nvidia drivers ... tensorflow cannot access GPU in Docker
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found