Ricks-Lab / gpu-utils

A set of utilities for monitoring and customizing GPU performance
GNU General Public License v3.0
136 stars 23 forks source link

PyPI Package Available #87

Closed Ricks-Lab closed 4 years ago

Ricks-Lab commented 4 years ago

I have posted a package at PyPI which can be installed with:

pip install ricks-amdgpu-utils

Let me know of any issues.

KeithMyers commented 4 years ago

Have you added any more dependencies than what I have already installed for --plot function?

Or are you asking just to see whether your construction of the package was correct?

Ricks-Lab commented 4 years ago

There are no additional dependencies. It is just an easier way to install and use the utilities. Sets up paths and you can execute from anywhere.

KeithMyers commented 4 years ago

Well your command does not work as input. Same issue I had the first time I installed from the original dependencies list.

keith@Serenity:~$ pip install ricks-amdgpu-utils

Command 'pip' not found, but there are 18 similar ones.

But I realized after my first attempt that pip is a python3 utility. So the correct command is:

pip3 install ricks-amdgpu-utils

keith@Serenity:~$  pip3 install ricks-amdgpu-utils
Collecting ricks-amdgpu-utils
  Downloading ricks-amdgpu-utils-3.2.4.tar.gz (106 kB)
     |████████████████████████████████| 106 kB 95 kB/s 
Requirement already satisfied: cycler>=0.10.0 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (0.10.0)
Requirement already satisfied: kiwisolver>=1.1.0 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (1.1.0)
Requirement already satisfied: matplotlib>=3.1.3 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (3.1.3)
Requirement already satisfied: numpy>=1.18.1 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (1.18.1)
Requirement already satisfied: pandas>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (1.0.1)
Requirement already satisfied: pyparsing>=2.4.6 in /usr/lib/python3/dist-packages (from ricks-amdgpu-utils) (2.4.6)
Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (2.8.1)
Requirement already satisfied: pytz>=2019.3 in /usr/lib/python3/dist-packages (from ricks-amdgpu-utils) (2019.3)
Requirement already satisfied: ruamel.yaml.clib==0.2.0 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (0.2.0)
Requirement already satisfied: ruamel.yaml==0.16.10 in /usr/local/lib/python3.8/dist-packages (from ricks-amdgpu-utils) (0.16.10)
Requirement already satisfied: six>=1.11.0 in /usr/lib/python3/dist-packages (from ricks-amdgpu-utils) (1.14.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from kiwisolver>=1.1.0->ricks-amdgpu-utils) (45.2.0)
Building wheels for collected packages: ricks-amdgpu-utils
  Building wheel for ricks-amdgpu-utils (setup.py) ... done
  Created wheel for ricks-amdgpu-utils: filename=ricks_amdgpu_utils-3.2.4-py3-none-any.whl size=128546 sha256=edfa35c52573a7b2d9fd26462bdf0971100c9744d3a4c35749d7f25e84baadc9
  Stored in directory: /home/keith/.cache/pip/wheels/3f/fe/63/ac368948bcf5616c1ed8880d9aabe6e6a30c1c1558dc9f57c7
Successfully built ricks-amdgpu-utils
Installing collected packages: ricks-amdgpu-utils
Successfully installed ricks-amdgpu-utils-3.2.4
Ricks-Lab commented 4 years ago

It gets confusing since only pip works in a venv, but pip3 is needed outside. Probably related to the existence of Python2. Look forward to Python2 going away.

KeithMyers commented 4 years ago

Yes, I know nothing about venv. But had to deal with the pip utility for the all the packages I needed to install for the liquidctl utility, so learned a bit about it then. https://github.com/jonasmalacofilho/liquidctl

Ricks-Lab commented 4 years ago

After installation, a version of the utilities will exist in your ~/.local directory, which should be added to your path.

Even the PyPI site indicates using pip. I will update the README to indicate pip3.

KeithMyers commented 4 years ago

Ok, I see them. Neat. Still will need to update them via git from your repo, whenever you update the branch. Correct? Or is using pip3 sufficient to pull in the updated ricks-amdgpu-utils package now?

Ricks-Lab commented 4 years ago

The expectation is that most users would install with pip3. If an update is available, pip3 install will install the latest. I plan to update the package on PyPI whenever I do a release on GitHub. So most users would never need to download from GitHub repository.

But for testing of development/pre-release versions, one would need to download/clone from the repository.

KeithMyers commented 4 years ago

Just wanted to update you. It looks like the path to the utilities was not added to my system. This is where they ended up on my system: /home/keith/.local/bin But they are not in the system path. echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin If you export the path it still complains about not finding the icons.

amdgpu-ls
Icon path [/usr/share/ricks-amdgpu-utils/icons] not found
Icon path [/home/keith/.local/lib/python3.8/site-packages/GPUmodules/../icons] not found
Ricks-Lab commented 4 years ago

Yes, I found the PATH issue on one of my systems. Seems like path doesn't exist until the first time you install a package like this. Next time you log in, it should add to PATH automatically.

The Icon path statements are some debug I was doing since the path to them is something I needed to figure out. If you install again, you should get v3.3.0 which has those statements removed.

KeithMyers commented 4 years ago

So I tried to get the new v3.30 package with the same pip3 statement. But all I get is a statement that all the packages are: Requirement already satisfied:

KeithMyers commented 4 years ago

The path did get updated though after logging out and back in as you said.

Ricks-Lab commented 4 years ago

If you execute amdgpu-ls --about does it indicate running v3.3.0?

Ricks-Lab commented 4 years ago

I found a problem. Seems like I need to define the version of GPUmodule in the setup.py file, else it won't update it if an older version is there.

KeithMyers commented 4 years ago

If you execute amdgpu-ls --about does it indicate running v3.3.0?

amdgpu-ls --about Author: RueiKe Copyright: Copyright (C) 2019 RueiKe Credits: ['Craig Echt - Testing, Debug, Verification, and Documentation', 'Keith Myers - Testing, Debug, Verification of NV Capability'] License: GNU General Public License Version: v3.3.0 Maintainer: RueiKe Status: Development - Extended

Ricks-Lab commented 4 years ago

The problem I found is that the package install is updating the executables, but not updating the GPUmodules directory. Not sure how to force this to happen in the setup.py file. I have some research to do. In the meantime, you can uninstall and then install to make sure you have the latest.

KeithMyers commented 4 years ago

OK, uninstalled the 3.24 wheel and installed the 3.35 wheel.