Skip to content
Advertisement

Windows compatibility: Permissions?

OS Windows 10, I am using Docker Engine version 18.09.2, the API version is 1.39

The website explaining the steps to run CAT is: https://libraries.io/pypi/medcat

I am building the medcat image locally. Output looks good until the end of the build process:

JavaScript

When I am trying to start the container I just built, I get:

JavaScript

Does anyone have experience with building on Windows? Does the security warning have anything to do with this?

Update: I added the permission for linux executable as in the received answer at this post. Then I built the image locally using the following command docker build --network=host -t cat -f Dockerfile.MedMen ., and the end of the building process gives me the same Security Warning. Then I checked docker run --env-file=./envs/env_medann ubuntu:18.04 env, which gave me:

JavaScript

Advertisement

Answer

This is because windows & linux has CR-LF & LF difference issue, meanwhile, permission need to be added for linux executable.
For your case, as you have got the source code, I think you have git installed on your windows. Then, you can open Git Bash, change the path to your source code directory, and execute next in it:

find . -type f | xargs dos2unix
chmod -R 777 *

Finally, rebuild it.


Update:

I try your code completely, it seems the issue is in cat/api/api.py, it misses a #!. So, into your sourcecode, edit cat/api/api.py, add next at the beginning of the sourcecode:

JavaScript

Then, rebuild with Dockerfile & run it again, you can see the effect from browser:

enter image description here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement