coronavs Posted August 25, 2020 Posted August 25, 2020 Hi, I have developed a web app in Flask that uses machine learning libraries such as Tensorflow, Keras, Scipy etc that need to be installed on the server in order to work.I followed the tutorial for flask on the gitbook but it is not enough as I need to install additional libraries. I hosted on Johnny server and currently I receive http 500 error. I have attached the requirement txt file for further detail about the packages. Could someone help me install these libraries or if it is any other way to run it? Thank you in advance. requirements.txt
Flaze Posted August 25, 2020 Posted August 25, 2020 This support request is being escalated to our root admin. 1
Krydos Posted August 27, 2020 Posted August 27, 2020 You can see the python modules that are currently installed on Johnny's python 3.7 at this link https://krydos2.heliohost.org/cgi-bin/modules37.py Go through the lines in your requirements.txt file and make sure each of them is listed on that link. If any of them aren't listed please post back which ones need to be installed.
coronavs Posted August 27, 2020 Author Posted August 27, 2020 Hi, thank you for your response. I can see some of the modules are already installed on Johnny's. Although, It would be certainly needed to install the following: Flask-Uploads==0.2.1 Keras==2.4.3 Keras-Preprocessing==1.1.2 opencv-python==4.3.0.36 Pillow==7.2.0 (update) scikit-learn==0.23.1 scipy==1.4.1 (update) h5py==2.10.0 tensorboard-plugin-wit==1.7.0 tensorflow==2.2.0 tensorflow-addons==0.10.0 kiwisolver==1.2.0 (update) opt-einsum==3.2.1 requests==2.24.0(update) Thank you for your assistance in this matter
Krydos Posted August 28, 2020 Posted August 28, 2020 There you go https://krydos2.heliohost.org/cgi-bin/modules37.py
coronavs Posted August 28, 2020 Author Posted August 28, 2020 Thank you Krydos. I can see them now installed in the list you mentioned. Although, I am having trouble in the imports.For instance, in the first line of the imports I have tensorflow but the server returns the following: Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator at webmaster@coronavs.heliohost.org to inform them of the time this error occurred, and the actions you performed just before this error.More information about this error may be available in the server error log.Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. But this is happening for all of the modules I requested to be installed.When I comment out the imports the app works so I am sure is something wrong with that. However, I've tested locally and it works fine. My app runs from the public_html/flask folder. Do you have any idea why this is happening? Thank you
Krydos Posted August 28, 2020 Posted August 28, 2020 It looks like there are two solutions to this issueUse an older version of python, such as 3.6, that is compatible with CentOS's older gccUpgrade CentOS's gcc to a newer version that is compatible with newer versions of python, such as 3.7 that we have installed or even 3.8Neither of these things are possible because upgrading gcc would break many other things on the server, and hundreds of other people are using already using python 3.7 so downgrading it would likely break everyone else's code. This won't work on Tommy either, because he has the same gcc version and python 3.7 too. Ricky has flask on python 2.7 so that probably isn't an option either. It looks like the only options left for you isFigure out how to do what you're trying to do without tensorflowSwitch to a vps https://www.heliohost.org/vps/ where you will have root command line access to install whatever versions of gcc and python and tensorflow that will work together.
coronavs Posted August 28, 2020 Author Posted August 28, 2020 (edited) As I am understanding right, you are describing that the gcc is incompatible with CentOs version that is currently on?Is there any way to work on virtual environment? that would fix the issue. In regards to the option you offer:unfortunately, there is no way to work without tensorflow at the moment while the latter option can't be considered, thank you. Edited August 28, 2020 by coronavs
Krydos Posted August 29, 2020 Posted August 29, 2020 As I am understanding right, you are describing that the gcc is incompatible with CentOs version that is currently on?No, CentOS ships with a fairly old version of gcc. The version of gcc that we're currently using is fully compatible with CentOS, but if I was to update gcc it wouldn't be anymore. Is there any way to work on virtual environment? that would fix the issue.No.
Recommended Posts