mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
chore: update Dockerfile
This commit is contained in:
parent
118cbfed28
commit
cdf811b60d
1 changed files with 10 additions and 9 deletions
19
Dockerfile
19
Dockerfile
|
|
@ -2,22 +2,23 @@ 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 && \
|
||||
usermod -o -u 0 -g 0 _apt
|
||||
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic-security main universe" >> /etc/apt/sources.list
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -yq python3 python3-pip
|
||||
|
||||
RUN apt-get clean autoclean
|
||||
RUN apt-get autoremove --yes
|
||||
RUN rm -rf /var/lib/{apt,dpkg,cache,log}
|
||||
# Install Python 3
|
||||
RUN apt-get update && \
|
||||
apt-get install --quiet --yes --no-install-recommends \
|
||||
python3-dev python3-pip python3-setuptools python3-wheel locales && \
|
||||
rm -rf /var/lib/{apt,dpkg,cache,log}
|
||||
|
||||
# Install nvitop
|
||||
COPY . /nvitop
|
||||
WORKDIR /nvitop
|
||||
RUN pip3 install .
|
||||
RUN pip3 install --compile .
|
||||
RUN rm -rf /root/.cache
|
||||
|
||||
# Entrypoint
|
||||
ENV LC_ALL C.UTF-8
|
||||
ENTRYPOINT [ "python3", "nvitop.py" ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue