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='*'