File tree Expand file tree Collapse file tree 6 files changed +19
-13
lines changed Expand file tree Collapse file tree 6 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,16 @@ jobs:
29
29
- name : Build wheel and tarball
30
30
run : python3 -m build --sdist --wheel --outdir dist/ ${{ matrix.package }}
31
31
- name : Publish to TestPyPI
32
- uses : pypa/gh-action-pypi-publish@v1.8.6
32
+ uses : pypa/gh-action-pypi-publish@v1.12.4
33
33
with :
34
34
password : ${{ secrets.TEST_PYPI_API_TOKEN }}
35
35
repository-url : https://test.pypi.org/legacy/
36
36
skip-existing : true
37
+ verbose : true
37
38
- name : Publish to PyPI
38
39
if : startsWith(github.ref, 'refs/tags')
39
40
uses : pypa/gh-action-pypi-publish@v1.8.6
40
41
with :
41
42
password : ${{ secrets.PYPI_API_TOKEN }}
42
43
skip-existing : true
43
- # `continue-on-error` needed cause `skip-existing: true` is not honored
44
- # https://github.com/pypa/gh-action-pypi-publish/issues/201
45
- continue-on-error : true
44
+ verbose : true
Original file line number Diff line number Diff line change 4
4
5
5
<p align =" center " >
6
6
<img src =" https://img.shields.io/github/license/ika-rwth-aachen/docker-run " />
7
+ <a href =" https://pypi.org/project/docker-run-cli/ " ><img src =" https://img.shields.io/badge/python-v3.7--v3.12-blue.svg " /></a >
7
8
<a href =" https://pypi.org/project/docker-run-cli/ " ><img src =" https://img.shields.io/pypi/v/docker-run-cli?label=PyPI " /></a >
8
9
<a href =" https://pypi.org/project/docker-run-cli/ " ><img src =" https://img.shields.io/pypi/dm/docker-run-cli?color=blue&label=PyPI%20downloads " /></a >
9
10
</p >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
5
5
[project ]
6
6
name = " docker-run-cli"
7
- version = " 0.9.8 "
7
+ version = " 0.9.9 "
8
8
description = " 'docker run' and 'docker exec' with useful defaults"
9
9
license = {file = " LICENSE" }
10
10
readme = " README.md"
@@ -23,14 +23,14 @@ classifiers = [
23
23
" Operating System :: POSIX :: Linux" ,
24
24
]
25
25
keywords = [" docker" , " container" ]
26
- dependencies = [" GPUtil~=1.4.0 " ]
26
+ dependencies = [" nvidia-ml-py~=12.570.86 " ]
27
27
requires-python = " >=3.7"
28
28
29
29
[project .optional-dependencies ]
30
30
dev = [" build" , " twine" ]
31
- docker-ros = [" docker-run-docker-ros>=1.0.5 " ]
32
- plugins = [" docker-run-docker-ros>=1.0.5 " ]
33
- all = [" docker-run-docker-ros>=1.0.5 " , " build" , " twine" ]
31
+ docker-ros = [" docker-run-docker-ros>=1.0.6 " ]
32
+ plugins = [" docker-run-docker-ros>=1.0.6 " ]
33
+ all = [" docker-run-docker-ros>=1.0.6 " , " build" , " twine" ]
34
34
35
35
[project .urls ]
36
36
"Repository" = " https://github.com/ika-rwth-aachen/docker-run"
Original file line number Diff line number Diff line change 1
1
__name__ = "docker-run"
2
- __version__ = "0.9.8 "
2
+ __version__ = "0.9.9 "
Original file line number Diff line number Diff line change 4
4
import tempfile
5
5
from typing import Any , Dict , List
6
6
7
- import GPUtil
7
+ import pynvml
8
8
9
9
from docker_run .utils import log , runCommand
10
10
from docker_run .plugins .plugin import Plugin
@@ -87,7 +87,13 @@ def localeFlags(cls) -> List[str]:
87
87
88
88
@classmethod
89
89
def gpuSupportFlags (cls ) -> List [str ]:
90
- if len (GPUtil .getGPUs ()) > 0 :
90
+ n_gpus = 0
91
+ try :
92
+ pynvml .nvmlInit ()
93
+ n_gpus = pynvml .nvmlDeviceGetCount ()
94
+ except pynvml .NVMLError :
95
+ pass
96
+ if n_gpus > 0 :
91
97
if cls .ARCH == "x86_64" :
92
98
return ["--gpus all" ]
93
99
elif cls .ARCH == "aarch64" and cls .OS == "Linux" :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
5
5
[project ]
6
6
name = " docker-run-docker-ros"
7
- version = " 1.0.5 "
7
+ version = " 1.0.6 "
8
8
description = " docker-run plugin for Docker images built by docker-ros"
9
9
license = {file = " LICENSE" }
10
10
readme = " README.md"
You can’t perform that action at this time.
0 commit comments