dusty-nv / jetson-containers

Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
MIT License
1.88k stars 416 forks source link

not able to use jtop inside containers #544

Open saeid93 opened 1 month ago

saeid93 commented 1 month ago

I tried to install and use jtop inside the container to get GPU stats but I get the following error:

es/deviceQueryDrv# pip install -U jetson-stats
Collecting jetson-stats
  Downloading https://files.pythonhosted.org/packages/8b/96/7152f4623afb2c2a15b6795993adc7c1604f405f014d58d2d8919428b2ad/jetson-stats-4.2.8.tar.gz (116kB)
    100% |████████████████████████████████| 122kB 2.0MB/s 
Collecting smbus2 (from jetson-stats)
  Downloading https://files.pythonhosted.org/packages/d6/5b/3ada173f07b4ec9bfa03b779e59ecada48eb7cb1a29f51cfce70edce7f3f/smbus2-0.4.3-py2.py3-none-any.whl
Collecting distro (from jetson-stats)
  Downloading https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl
Building wheels for collected packages: jetson-stats
  Running setup.py bdist_wheel for jetson-stats ... done
  Stored in directory: /root/.cache/pip/wheels/34/a8/09/e67f6abad9b27dd86a1baf35495b33be8cca60bc937ec1db12
Successfully built jetson-stats
Installing collected packages: smbus2, distro, jetson-stats
Successfully installed distro-1.9.0 jetson-stats-4.2.8 smbus2-0.4.3
Cache entry deserialization failed, entry ignored
You are using pip version 10.0.1, however version 24.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@zun-ac8eae2d-fd18-4a04-8e8f-efe8820faa23-55d4f778fd-c9mtk:~/cuda-10.2/samples/1_Utilities/deviceQueryDrv# jtop
The jtop.service is not active. Please run:
sudo systemctl restart jtop.service
root@zun-ac8eae2d-fd18-4a04-8e8f-efe8820faa23-55d4f778fd-c9mtk:~/cuda-10.2/samples/1_Utilities/deviceQueryDrv# systemctl restart jtop.service
System has not been booted with systemd as init system (PID 1). Can't operate.
root@zun-ac8eae2d-fd18-4a04-8e8f-efe8820faa23-55d4f778fd-c9mtk:~/cuda-10.2/samples/1_Utilities/deviceQueryDrv# jtop
The jtop.service is not active. Please run:
sudo systemctl restart jtop.service
root@zun-ac8eae2d-fd18-4a04-8e8f-efe8820faa23-55d4f778fd-c9mtk:~/cuda-10.2/samples/1_Utilities/deviceQueryDrv# 

Any idea to either solving this or extracting GPU usage stats in some other way?