Facing issue while deploying MODEL: CUDA not available

I am working on an Image Enlargement project and using the following packages:

  1. h5py==2.10.0
  2. from ISR.models import RDN

Please help how to resolve it.

Error is as follows:

[client] Connecting...
2022-02-15 13:03:19.491 CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
Successfully installed ISR-2.2.0 MarkupSafe-2.0.1 PyWavelets-1.2.0 PyYAML-6.0 Send2Trash-1.8.0 absl-py-1.0.0 altair-4.2.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 astor-0.8.1 attrs-21.4.0 backcall-0.2.0 backports.zoneinfo-0.2.1 base58-2.1.1 bleach-4.1.0 blinker-1.4 cachetools-4.2.4 certifi-2021.10.8 cffi-1.15.0 chardet-3.0.4 charset-normalizer-2.0.12 click-8.0.3 debugpy-1.5.1 decorator-5.1.1 defusedxml-0.7.1 easyocr-1.4.1 entrypoints-0.4 gast-0.2.2 gitdb-4.0.9 gitpython-3.1.26 google-auth-1.35.0 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 googletrans-3.1.0a0 grpcio-1.43.0 h11-0.9.0 h2-3.2.0 h5py-2.10.0 hpack-3.0.0 hstspreload-2021.12.1 httpcore-0.9.1 httpx-0.13.3 hyperframe-5.2.0 idna-2.10 imageio-2.9.0 importlib-metadata-4.11.1 importlib-resources-5.4.0 ipykernel-6.9.0 ipython-7.31.1 ipython-genutils-0.2.0 ipywidgets-7.6.5 jedi-0.18.1 jinja2-3.0.3 jsonschema-4.4.0 jupyter-client-7.1.2 jupyter-core-4.9.1 jupyterlab-pygments-0.1.2 jupyterlab-widgets-1.0.2 keras-applications-1.0.8 keras-preprocessing-1.1.2 markdown-3.3.6 matplotlib-inline-0.1.3 mistune-0.8.4 nbclient-0.5.11 nbconvert-6.4.2 nbformat-5.1.3 nest-asyncio-1.5.4 networkx-2.6.3 notebook-6.4.8 numpy-1.21.5 oauthlib-3.2.0 opencv-python-headless-4.5.2.52 opt-einsum-3.3.0 packaging-21.3 pandas-1.3.5 pandocfilters-1.5.0 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 pillow-8.2.0 pip-22.0.3 prometheus-client-0.13.1 prompt-toolkit-3.0.28 protobuf-3.19.4 ptyprocess-0.7.0 pyaml-21.10.1 pyarrow-7.0.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pydeck-0.7.1 pygments-2.11.2 pympler-1.0.1 pyparsing-3.0.7 pyrsistent-0.18.1 python-bidi-0.4.2 python-dateutil-2.8.2 pytz-2021.3 pytz-deprecation-shim-0.1.0.post0 pyzmq-22.3.0 requests-2.27.1 requests-oauthlib-1.3.1 rfc3986-1.5.0 rsa-4.8 scikit-image-0.19.1 scipy-1.7.3 setuptools-60.9.1 six-1.16.0 smmap-5.0.0 sniffio-1.2.0 streamlit-1.5.1 tensorboard-2.0.2 tensorflow-2.0.0 tensorflow-estimator-2.0.1 termcolor-1.1.0 terminado-0.13.1 testpath-0.5.0 tifffile-2021.11.2 toml-0.10.2 toolz-0.11.2 torch-1.10.2 torchvision-0.11.3 tornado-6.1 tqdm-4.62.3 traitlets-5.1.1 typing-extensions-4.1.1 tzdata-2021.5 tzlocal-4.1 urllib3-1.26.8 validators-0.18.2 watchdog-2.1.6 wcwidth-0.2.5 webencodings-0.5.1 werkzeug-2.0.3 wheel-0.37.1 widgetsnbextension-3.5.2 wrapt-1.13.3 zipp-3.7.0
[manager] Python dependencies were installed from /app/streamlit/requirements.txt using pip.
[manager] Processed dependencies!



[client] Connecting...
2022-02-15 13:03:19.491 CUDA not available - defaulting to CPU. Note: This module is much faster with a GPU.
2022-02-15 13:03:19.491 Downloading detection model, please wait. This may take several minutes depending upon your network connection.
[manager] Streamlit server consistently failed status checks
[manager] Please fix the errors, push an update to the git repo, or reboot the app.

Hey @vikaskftpl

Welcome to the Streamlit Community :tada::tada:

Now coming to your question, CUDA refers to the set of libraries that allows us to use the power of NVIDIA GPUs while training the model and making predictions, speeding up the whole process.

But the thing is that there is no GPU available on the Cloud (at least on the community version) so there is no need for you to install the GPU version of TensorFlow. So I would strongly suggest you replace tensorflow with tensorflow-cpu in your requirements.txt file.

This would drastically reduce the overall size of your app and would enable you to download the required detection model that your model seems to be downloading.

Let me know if you need additional help.
Kanak

2 Likes

Thanks Kanak, but the issue has still not been solved. Even after making a change in Requirements file, still getting the following error:

File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 379, in _run_script
    exec(code, module.__dict__)File "/app/streamlit/EnlargeImage.py", line 5, in <module>
    from ISR.models import RDN

Please help me in solving this new issue

Hey @vikaskftpl

Can you check if ISR is included in the requirements.txt file?
Also, can you post the complete error message? Currently, it only shows where the problem occurred and not what the problem is.

Best,
Kanak