diff --git a/Dockerfile b/Dockerfile index a90a710..5d45942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,10 @@ RUN apt-get update && \ python3-dev python3-pip python3-setuptools python3-wheel locales && \ rm -rf /var/lib/{apt,dpkg,cache,log} +# Setup locale +ENV LC_ALL C.UTF-8 +RUN update-locale LC_ALL="C.UTF-8" + # Install nvitop COPY . /nvitop WORKDIR /nvitop @@ -20,5 +24,4 @@ RUN pip3 install --compile . RUN rm -rf /root/.cache # Entrypoint -ENV LC_ALL C.UTF-8 ENTRYPOINT [ "python3", "nvitop.py" ] diff --git a/README.md b/README.md index dc22dc1..d012d80 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Install from PyPI ([![PyPI](https://img.shields.io/pypi/v/nvitop?label=PyPI)](ht pip3 install --upgrade nvitop ``` -Install the latest version from GitHub (![Commit Count](https://img.shields.io/github/commits-since/XuehaiPan/nvitop/v0.3.5.6)): +Install the latest version from GitHub (![Commit Count](https://img.shields.io/github/commits-since/XuehaiPan/nvitop/v0.3.6)): ```bash pip3 install --force-reinstall git+https://github.com/XuehaiPan/nvitop.git#egg=nvitop diff --git a/nvitop/gui/screens/treeview.py b/nvitop/gui/screens/treeview.py index b36c05e..7cbd363 100644 --- a/nvitop/gui/screens/treeview.py +++ b/nvitop/gui/screens/treeview.py @@ -255,6 +255,10 @@ class TreeViewScreen(Displayable): self.addstr(self.y, self.x, 'COMMAND'.ljust(self.width)) self.color_at(self.y, self.x, width=self.width, fg='cyan', attr='bold | reverse') + if len(self.snapshots) == 0: + self.addstr(self.y + 1, self.x, 'No running GPU processes found.') + return + self.selected.within_window = False for y, process in enumerate(self.snapshots, start=self.y + 1): prefix_length = len(process.prefix) diff --git a/nvitop/version.py b/nvitop/version.py index 8b8595c..796b0bf 100644 --- a/nvitop/version.py +++ b/nvitop/version.py @@ -3,7 +3,7 @@ """An interactive NVIDIA-GPU process viewer, the one-stop solution for GPU process management.""" -__version__ = '0.3.5.6' +__version__ = '0.3.6' __license__ = 'GPLv3' __author__ = __maintainer__ = 'Xuehai Pan' __email__ = 'XuehaiPan@pku.edu.cn'