Update Dockerfile

This commit is contained in:
XuehaiPan
2021-09-09 15:13:00 +08:00
parent 29e5523013
commit e535834071
3 changed files with 10 additions and 11 deletions

View File

@@ -1,4 +0,0 @@
*.o
*ctags
build/
cmake-build*/

1
.dockerignore Symbolic link
View File

@@ -0,0 +1 @@
.gitignore

View File

@@ -2,8 +2,9 @@ FROM nvidia/driver:418.87.01-ubuntu18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -yq build-essential cmake libncurses5-dev libncursesw5-dev
RUN apt-get update && \
apt-get install -yq build-essential cmake libncurses5-dev libncursesw5-dev && \
rm -rf /var/lib/{apt,dpkg,cache,log}
COPY . /nvtop
WORKDIR /nvtop
@@ -11,7 +12,8 @@ RUN mkdir -p /nvtop/build && \
cd /nvtop/build && \
cmake .. && \
make && \
make install
make install && \
rm -rf /nvtop/build
ENV LANG C.UTF-8
ENV LANG=C.UTF-8
ENTRYPOINT [ "/usr/local/bin/nvtop" ]

View File

@@ -134,9 +134,9 @@ Two libraries are required in order for NVTOP to display GPU information:
- [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) (See [Container Toolkit Installation Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker))
- ```bash
git clone https://github.com/Syllo/nvtop.git
docker build --tag nvtop .
docker run --interactive --tty --rm --runtime=nvidia --gpus all --pid=host nvtop
git clone https://github.com/Syllo/nvtop.git && cd nvtop
sudo docker build --tag nvtop .
sudo docker run -it --rm --runtime=nvidia --gpus=all --pid=host nvtop
```
## NVTOP Build