Giter Club home page Giter Club logo

Comments (3)

nicozhan avatar nicozhan commented on July 28, 2024

Thanks for your question. We will update it to Readme doc.

Enable model services
Make sure you have installed NVIDIA Driver and NVIDIA Container Toolkit. But you do not need to install the CUDA Toolkit, as it already contained in the model image.

Set "default-runtime" as "nvidia" in /etc/docker/daemon.json and restart docker to enable NVIDIA Container Toolkit

{
  "runtimes": {
    "nvidia": {
      "path": "nvidia-container-runtime",
      "runtimeArgs": []
    }
  },
  "default-runtime": "nvidia"
}

Need to explicitly specify model profile to enable model services.

docker compose --profile model up

from xtreme1.

chasingw avatar chasingw commented on July 28, 2024

Thanks for your question. We will update it to Readme doc.

Enable model services Make sure you have installed NVIDIA Driver and NVIDIA Container Toolkit. But you do not need to install the CUDA Toolkit, as it already contained in the model image.

Set "default-runtime" as "nvidia" in /etc/docker/daemon.json and restart docker to enable NVIDIA Container Toolkit

{
  "runtimes": {
    "nvidia": {
      "path": "nvidia-container-runtime",
      "runtimeArgs": []
    }
  },
  "default-runtime": "nvidia"
}

Need to explicitly specify model profile to enable model services.

docker compose --profile model up

thanks for your help, I change the config and restart docker, but it doesn't work. and I check another docker image to check my docker enviroment, it success

(base) ➜  xtreme1 git:(main) docker run --rm -it --gpus all tensorrt-ubuntu18.04-cuda11.4 bash                   
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

trtuser@f9bb9f074adb:/workspace$ python
Python 3.6.9 (default, Mar 15 2022, 13:55:28) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
True
>>> torch.Tensor().cuda()
tensor([], device='cuda:0')

but I check in the xtreme container it doesnt work,

(base) ➜  xtreme1 git:(main) docker ps
CONTAINER ID   IMAGE                                          COMMAND                  CREATED        STATUS                   PORTS                                                                                  NAMES
739269c3bdc4   basicai/xtreme1-point-cloud-object-detection   "python app.py ../cb…"   20 hours ago   Up 7 minutes             0.0.0.0:8293->5000/tcp, :::8293->5000/tcp

base) ➜  xtreme1 git:(main) docker exec -it 739269c3bdc4 /bin/bash
root@739269c3bdc4:/app/pcdet_open# python
Python 3.6.9 (default, Mar 15 2022, 13:55:28) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
False
>>> torch.Tensor().cuda()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py", line 214, in _lazy_init
    torch._C._cuda_init()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
>>> 

any suggestion about this?

from xtreme1.

chasingw avatar chasingw commented on July 28, 2024

fixed by #68

from xtreme1.

Related Issues (20)

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.