Closed gitknu closed 1 year ago
Thanks, I'll look into it. I guess it may be caused by the Python dependencies versions.
May I ask which OS were you trying to run it? and can you provide more info on how to reproduce the problem?
Debian-based Linux. AS for Python - 3.10 As for tensorflow - https://github.com/yaroslavvb/tensorflow-community-wheels/issues/209 (while the CPU is quite old, but I don't think this is the problem, just no AVX2 support and no GPU, but, for example, Stable diffusion (CPU-only) runs pretty well. Slowly, but well)
So this is an algorithm: 0) apt install docker && apt install docker-compose 1) https://github.com/yaroslavvb/tensorflow-community-wheels/issues/209 (download) 2) pip install --ignore-installed --upgrade tensorflow-2.8.0-cp37-cp37m-linux_x86_64.whl 3) git clone https://github.com/mtobeiyf/keras-flask-deploy-webapp.git 4) cd keras-flask-deploy-webapp 5) docker build -t keras_flask_app . 6) docker run -it --rm -p 5000:5000 keras_flask_app 7) (here goes the issue) 8) I google the issue, see that it may be caused by gevent or greenlet (but they are there, the latest versions, 2.0.1 or something like that)
I haven't updated the dependencies for a long time so there might be some incompatibility from the newer versions of the library.
Can you try pinning the gevent to the old version in the requirements.txt? (it is 1.4 in the requirements.txt)
I'll look into it further once I get chance.
uninstalled previous version, now
pip install gevent==1.4
and so i get
ERROR: Failed building wheel for gevent
Running setup.py clean for gevent
Failed to build gevent
ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects
I have read that this is may be caused by python, which is incompatible (need 3.8, not 3.10, so trying to downgrade - I'll edit this comment as soon as will now the result)
I see, will try bumping the Tensorflow wheel version in this repository.
Should be fixed by https://github.com/imfing/keras-flask-deploy-webapp/pull/61, see the root cause here: https://github.com/gevent/gevent/issues/1260
Also if you want to use a different tensorflow version, please only change the dockerfile
accordingly, and remove the tensorflow
entry in requirements.txt
.
The updated tensorflow version will be reflected in docker build -t keras_flask_app .
Hello, thank you for your great job! The problem I have is I can't run this project. I use Docker but each time get this error:
I was trying to update gevent, I have the latest version of greenlet. I also tried local installm but seem to get the same problems at first, that's why switched to Docker as usually it is much easier to run.
What do I have to do? Thank you!