I have code in the backend of django project which is hosted on PythonAnywhere that uses tensorflow. However, I am getting this error in server log and a 502 Bad Gateway server error
2020-08-01 00:48:36 2020-08-01 00:48:36.440295: W
tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory 2020-08-01 00:48:36 2020-08-01 00:48:36.440328: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303) 2020-08-01 00:48:36 2020-08-01 00:48:36.440338: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (green-liveweb12): /proc/driver/nvidia/version does not exist 2020-08-01 00:48:36 2020-08-01 00:48:36.440538: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA#012To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-08-01 00:48:36 2020-08-01 00:48:36.447533: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2300045000 Hz 2020-08-01 00:48:36 2020-08-01 00:48:36.447779: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0xb5fce60 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-08-01 00:48:36 2020-08-01 00:48:36.447793: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-08-01 00:48:37 2020-08-01 00:48:37.627991: F tensorflow/core/platform/env.cc:351] Check failed: -1 != path_length (-1 vs. -1) 2020-08-01 00:48:38 DAMN ! worker 1 (pid: 3) died, killed by signal 6 :( trying respawn ... 2020-08-01 00:48:38 Respawned uWSGI worker 1 (new pid: 31) 2020-08-01 00:48:38 spawned 2 offload threads for uWSGI worker 1
Please let me know how to use tensorflow on pythonAnywhere or any configurations i have to add.
Thanks