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介绍

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Pistachiout

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值