Git Product home page Git Product logo

Comments (4)

mikhail-vl avatar mikhail-vl commented on June 10, 2024

@BaoWentz I believe you should do the same steps as we outlined in the recent article for PyTorch: https://volkovlabs.com/we-tried-pytorch-in-docker-container-with-nvidia-gpu-support-on-google-cloud-5e30c49d9864.

Could you please try and let me know if it works for you.

from redis-camera-ai.

BaoWentz avatar BaoWentz commented on June 10, 2024

Thanks for your answer, your answer helped me a lot.I just fllow your answer and my Docker version is 20.10.12, my Docker Compose version is v2.3.2.
Below is my current docker-compose file:

version: '3'
services:
  redisedge:
    build: ./redisedge
    ports:
      - 6379:6379
    runtime: nvidia
    environment:
      NVIDIA_VISIBLE_DEVICES: all
  init:
    build: ./app
    depends_on:
      - redisedge
    volumes:
      - ./app:/app
    command: ['init.py', '--url', 'redis://172.20.10.64:6379', '-d', 'GPU']

Now the cmd: nvidia-smi works in my container, however TF still couldn't find CUDA.
Here is part of the bug log:

redisedge-redisedge-1  | 1:M 09 Mar 2022 16:58:05.407 # <ai> backend TF not loaded, will try loading default backend
redisedge-redisedge-1  | 2022-03-09 16:58:05.518613: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.518646: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
redisedge-redisedge-1  | 1:M 09 Mar 2022 16:58:05.562 * <ai> TF backend loaded from /usr/lib/redis/modules/backends/redisai_tensorflow/redisai_tensorflow.so
redisedge-redisedge-1  | 2022-03-09 16:58:05.672075: 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
redisedge-redisedge-1  | To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
redisedge-redisedge-1  | 2022-03-09 16:58:05.878211: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878308: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublas.so.11'; dlerror: libcublas.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878372: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublasLt.so.11'; dlerror: libcublasLt.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878419: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878463: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878521: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusolver.so.11'; dlerror: libcusolver.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878585: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusparse.so.11'; dlerror: libcusparse.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878656: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/lib/redis/modules
redisedge-redisedge-1  | 2022-03-09 16:58:05.878673: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1835] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
redisedge-redisedge-1  | Skipping registering GPU devices...
redisedge-redisedge-1  | 1:M 09 Mar 2022 16:58:05.881 # <ai> ERR GPU requested but TF couldn't find CUDA
redisedge-init-1       | Loading model - Traceback (most recent call last):
redisedge-init-1       |   File "init.py", line 35, in <module>
redisedge-init-1       |     res = conn.execute_command('AI.MODELSET', 'yolo:model', 'TF', args.device, 'INPUTS', 'input', 'OUTPUTS', 'output', 'BLOB', model)
redisedge-init-1       |   File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 775, in execute_command
redisedge-init-1       |     return self.parse_response(connection, command_name, **options)
redisedge-init-1       |   File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 789, in parse_response
redisedge-init-1       |     response = connection.read_response()
redisedge-init-1       |   File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 642, in read_response
redisedge-init-1       |     raise response
redisedge-init-1       | redis.exceptions.ResponseError: GPU requested but TF couldn't find CUDA

THANKS a lot!

from redis-camera-ai.

mikhail-vl avatar mikhail-vl commented on June 10, 2024

@BaoWentz I believe you should install Cuda libraries which are required to use GPU as stated in the log file:

redisedge-redisedge-1  | 2022-03-09 16:58:05.878673: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1835] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
redisedge-redisedge-1  | Skipping registering GPU devices...

from redis-camera-ai.

mikhail-vl avatar mikhail-vl commented on June 10, 2024

@BaoWentz, Please reopen if you need anything else.

from redis-camera-ai.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.