gpu-burn+jupyter notebook镜像Dockerfile及gpu-burn介绍

#registry.cn-hangzhou.aliyuncs.com/mkmk/all:gpu-burn-cuda11.1的Dockerfile
#FROM nvidia/cuda:11.1.1-devel AS builder
#WORKDIR /build
#COPY . /build/
#RUN make

#FROM nvidia/cuda:11.1.1-runtime
#COPY --from=builder /build/gpu_burn /app/
#COPY --from=builder /build/compare.cu /app/
#WORKDIR /app

#CMD ["./gpu_burn", "60"]

FROM registry.cn-hangzhou.aliyuncs.com/mkmk/all:gpu-burn-cuda11.1

ARG TARGETARCH=amd64

USER root
ENV TZ=Asia/Shanghai
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  A4B469963BF863CC


RUN apt-get update
# 安装中文,和基础的apt工具包
RUN apt update
RUN apt install apt-utils -y
#RUN apt install -y --force-yes --no-install-recommends software-properties-common vim apt-transport-https gnupg2 ca-certificates-java rsync jq  wget git dnsutils iputils-ping net-tools curl mysql-client zip unzip locales ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy \
#    && \
#   locale-gen zh_CN && locale-gen zh_CN.utf8
RUN apt install -y --allow-downgrades --no-install-recommends software-properties-common vim apt-transport-https gnupg2 ca-certificates-java rsync jq wget git dnsutils iputils-ping net-tools curl mysql-client zip unzip locales ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy --fix-missing && locale-gen zh_CN && locale-gen zh_CN.utf8
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
ENV LANGUAGE zh_CN.UTF-8

RUN echo "alias ll='ls -alF'" >> /root/.bashrc && \
    echo "alias la='ls -A'" >> /root/.bashrc && \
    echo "alias vi='vim'" >> /root/.bashrc && \
    /bin/bash -c "source /root/.bashrc" \

RUN apt --fix-broken install #&& apt install -y libnvidia-compute-535

RUN apt list --upgradable
# 安装python
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt update && apt install -y  libsasl2-dev libpq-dev python3-pip
#
RUN apt install -y python3.9 python3.9-dev && rm -rf /usr/bin/python3; ln -s /usr/bin/python3.9 /usr/bin/python3 \
    && rm -rf /usr/bin/python;  ln -s /usr/bin/python3 /usr/bin/python
#
RUN bash -c "wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --ignore-installed --force-reinstall" \
    && rm -rf /usr/bin/pip; ln -s /usr/bin/pip3 /usr/bin/pip
#
RUN rm -rf /usr/bin/python;  ln -s /usr/bin/python3 /usr/bin/python

# 安装最新版的nodejs
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install nodejs -y&& apt-get install npm && npm config set unicode false
#配置镜像院https://pypi.tuna.tsinghua.edu.cn/simple
#COPY pip.conf /root/.pip/pip.conf 
#RUN pip cache purge
#RUN python -m pip install python-dev
RUN pip install --upgrade pip

RUN pip install tornado gsutil simplejson sqlalchemy joblib scikit-learn==1.2.2 jinja2 requests numpy pandas flask pymysql pysnooper pyyaml jupyterlab voila notebook && \
    rm -rf /tmp/* /var/tmp/* /root/.cache

RUN pip install jupyterlab-nvdashboard==0.8 bokeh==2.4 -i https://pypi.tuna.tsinghua.edu.cn/simple && rm -rf /root/.cache

RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
RUN pip install --upgrade jupyterlab-git && jupyter lab build

# 安装启动sshd
RUN apt install -y openssh-server openssh-client

# 环境变量
ENV NODE_HOME /usr/local
ENV PATH $NODE_HOME/bin:$PATH
ENV NODE_PATH $NODE_HOME/lib/node_modules:$PATH
ENV SHELL /bin/bash

# 环境初始化配置
#COPY init.sh /init.sh


# jupyter lab --notebook-dir=/home --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*'



可以自己将cuda版本换为cuda11.8

镜像结果

镜像可打开jupyter,并可在/app目录下执行./gpu_burn
在这里插入图片描述

1.gpu-burn介绍

相关推荐

  1. 使用gpu_burnGPU进行压测

    2024-06-17 14:12:02       50 阅读
  2. 0, GPU Microarchitecture介绍

    2024-06-17 14:12:02       31 阅读
  3. Docker笔记:关于Dockerfile构建镜像

    2024-06-17 14:12:02       60 阅读
  4. dockerfile——镜像构建工具详解案例

    2024-06-17 14:12:02       40 阅读
  5. 构建支持 gpu 的 jupyterlab docker 镜像

    2024-06-17 14:12:02       63 阅读
  6. GNU/Linux - 系统启动流程rcS脚本介绍

    2024-06-17 14:12:02       29 阅读
  7. etcd官方docker镜像dockerfile问题处理

    2024-06-17 14:12:02       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-17 14:12:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-17 14:12:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-06-17 14:12:02       87 阅读
  4. Python语言-面向对象

    2024-06-17 14:12:02       96 阅读

热门阅读

  1. Android 放大镜代码

    2024-06-17 14:12:02       39 阅读
  2. ThreadLocal 详讲

    2024-06-17 14:12:02       22 阅读
  3. FileUtils类中常用方法的介绍

    2024-06-17 14:12:02       28 阅读
  4. HIVE及SparkSQL优化经验

    2024-06-17 14:12:02       35 阅读
  5. Docker Desktop Installer For Windows 国内下载地址

    2024-06-17 14:12:02       57 阅读
  6. VB.net调用VC DLL(二)

    2024-06-17 14:12:02       32 阅读
  7. 教学资源共享平台的设计

    2024-06-17 14:12:02       34 阅读