Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install language and import text error #252

Closed
anqi970301 opened this issue May 9, 2024 · 9 comments
Closed

Install language and import text error #252

anqi970301 opened this issue May 9, 2024 · 9 comments

Comments

@anqi970301
Copy link

I have the same problem with #232 and an additional problem when importing text (all initial steps are possible, but "An error has occurred while importing your text." appears at the last step "Finish". I suspect that both problems are caused by the same thing.

In the browser console I get the error message:

languages/get-admin-language-settings-data:1 
Failed to load resource: server responded with status 500 (Internal Server Error)

I also find

"cURL error 7: Failed to connect to linguacafe-python-service port 8678 in 0 ms: Couldn't connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://linguacafe-python-service:8678/models/list"

According to #232 author, he also mentioned he solved the problem by "I've managed to figure out why the server couldn't communicate with the python container." (while I didn't ). I assume that comes from the incompatibility between architectures of different python and webserver container, python = amd46, webserver = arm46. I'm on mac M3 chip (arm46).

Python docker log:

qemu: uncaught target signal 4 (Illegal instruction) - core dumped
@simjanos-dev
Copy link
Owner

Sorry, I didnt see that you tagged me in the other issue.

Sadly, I dont know what the issue can be other than its related to the setup or docker itself. The problems are definitely happening because the python server is not functioning.

@sergiolaverde0 can you maybe help?

I found nothing useful in google either.

@sergiolaverde0
Copy link
Contributor

Architecture mismatch is not the cause, all communication between containers is made via http and the mounted volume. You also can't ping the python container from the host since we don't map any ports by default for security reasons.

Is that really all you have on the logs of the python container? Have you enabled Rosetta in the Docker Desktop settings?

@anqi970301
Copy link
Author

Is that really all you have on the logs of the python container?

That is.

Have you enabled Rosetta in the Docker Desktop settings?

I'm not using Docker Desktop, will that cause any problems?

@sergiolaverde0
Copy link
Contributor

It already did. Docker Desktop allows to use Rosetta to run images without support for Arm64 like our Python image, which uses Spacy models that only work in Amd64.

I don't know if you can enable Rosetta from Docker CLI but my search results don't look promising. I recommend using Docker Desktop as the easy solution.

@simjanos-dev
Copy link
Owner

simjanos-dev commented May 9, 2024

It already did. Docker Desktop allows to use Rosetta to run images without support for Arm64 like our Python image, which uses Spacy models that only work in Amd64.

I did not know about that at all. Even I assumed everything would work with just the basic docker. Should we add it to the user manual? I'll add it to the user manual.

@sergiolaverde0
Copy link
Contributor

We should, in older versions of Docker Desktop Rosetta was a mandatory dependency which is why it escaped us but apparently it has been optional for some time.

@anqi970301
Copy link
Author

Seems promising, I have managed to turn on rosetta and it works! However it does cause problems to my other containers. Thanks for pointing me to the correct direction anyway!

@sergiolaverde0
Copy link
Contributor

It might be trying to emulate the other containers too even if it shouldn't. You can try forcing their platform to linux/arm64 to see if it fixes it, which reminds me to remind you to set the linguacafe platform on a .env file like it says in our installation guide on the readme if you haven't.

@anqi970301
Copy link
Author

Thanks! I'm trying to figure out if I can set up individually for this container.

which reminds me to remind you to set the linguacafe platform on a .env file like it says in our installation guide on the readme if you haven't.

I have already done so, otherwise it points to no matching manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants