chore: update Dockerfile

This commit is contained in:
XuehaiPan 2021-09-09 15:32:34 +08:00
parent 45be96fd2b
commit 3538ff9314
2 changed files with 9 additions and 9 deletions

View file

@ -3,9 +3,9 @@ FROM nvidia/driver:418.87.01-ubuntu18.04
ENV DEBIAN_FRONTEND=noninteractive
# Update APT sources
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main universe" > /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-security main universe" >> /etc/apt/sources.list
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu bionic main universe" > /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu bionic-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu bionic-security main universe" >> /etc/apt/sources.list
# Install Python 3
RUN apt-get update && \
@ -14,14 +14,14 @@ RUN apt-get update && \
rm -rf /var/lib/{apt,dpkg,cache,log}
# Setup locale
ENV LC_ALL C.UTF-8
ENV LC_ALL=C.UTF-8
RUN update-locale LC_ALL="C.UTF-8"
# Install nvitop
COPY . /nvitop
WORKDIR /nvitop
RUN pip3 install --compile .
RUN rm -rf /root/.cache
RUN pip3 install --compile . && \
rm -rf /root/.cache
# Entrypoint
ENTRYPOINT [ "python3", "nvitop.py" ]
ENTRYPOINT [ "python3", "-m", "nvitop" ]