mirror of
https://github.com/tencentmusic/cube-studio.git
synced 2025-02-17 14:40:28 +08:00
去除多余jupyter镜像
This commit is contained in:
parent
11c1249611
commit
b74175b559
@ -1,59 +0,0 @@
|
||||
# docker build -t ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base -f Dockerfile-ubuntu-cpu-base .
|
||||
ARG FROM_IMAGES
|
||||
FROM $FROM_IMAGES
|
||||
|
||||
USER root
|
||||
# 安装中文,和基础的apt工具包
|
||||
RUN apt update && 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
|
||||
|
||||
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"
|
||||
|
||||
# 安装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.8 python3.8-dev && rm -rf /usr/bin/python3; ln -s /usr/bin/python3.8 /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 -y nodejs && npm config set unicode false
|
||||
|
||||
RUN pip install --upgrade pip && pip install tornado gsutil simplejson sqlalchemy joblib scikit-learn jinja2 requests numpy pandas flask pymysql pysnooper pyyaml jupyterlab voila notebook && \
|
||||
rm -rf /tmp/* /var/tmp/* /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
|
||||
|
||||
# 拷贝examples
|
||||
COPY examples/* /examples/
|
||||
|
||||
# 环境初始化配置
|
||||
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='*'
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# docker build -t ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-1.0.0 -f Dockerfile-ubuntu-cpu-1.0.0 .
|
||||
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04
|
||||
|
||||
# 安装插件
|
||||
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04
|
||||
|
||||
MAINTAINER hamawhite
|
||||
ARG SPARK_HADOOP_VERSION=3.2
|
||||
|
@ -5,7 +5,7 @@
|
||||
| Spark | 3.1.3 | spark-3.1.3-bin-hadoop3.2 |
|
||||
| Hive | 3.1.2 | apache-hive-3.1.2-bin |
|
||||
| Flink | 1.15.1 | pyFlink |
|
||||
| Python | 3.8.12 | notebook:jupyter-ubuntu-cpu-base 自带版本 |
|
||||
| Python | 3.8.12 | notebook:jupyter-ubuntu22.04 自带版本 |
|
||||
|
||||
## 二、基于Dockerfile实现
|
||||
|
||||
|
@ -1,13 +1,4 @@
|
||||
set -ex
|
||||
hubhost=ccr.ccs.tencentyun.com/cube-studio
|
||||
base_image=ubuntu:18.04
|
||||
docker build -t $hubhost/notebook:jupyter-ubuntu-cpu-base --build-arg FROM_IMAGES=$base_image -f Dockerfile-ubuntu-base .
|
||||
docker push $hubhost/notebook:jupyter-ubuntu-cpu-base
|
||||
|
||||
base_image=nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
|
||||
docker build -t $hubhost/notebook:jupyter-ubuntu-gpu-base --build-arg FROM_IMAGES=$base_image -f Dockerfile-ubuntu-base .
|
||||
docker push $hubhost/notebook:jupyter-ubuntu-gpu-base
|
||||
|
||||
|
||||
hubhost=ccr.ccs.tencentyun.com/cube-studio
|
||||
base_image=ubuntu:22.04
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04
|
||||
|
||||
RUN apt-get update && apt install -y lsof
|
||||
ENV TZ Asia/Shanghai
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base
|
||||
FROM ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04
|
||||
|
||||
RUN apt-get update && apt install -y lsof
|
||||
|
||||
|
@ -22,8 +22,8 @@ vscode镜像的构建在:https://github.com/tencentmusic/cube-studio/tree/mast
|
||||
NOTEBOOK_IMAGES=[
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:vscode-ubuntu-cpu-base', 'vscode(cpu)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:vscode-ubuntu-gpu-base', 'vscode(gpu)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base', 'jupyter(cpu)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-gpu-base','jupyter(gpu)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04', 'jupyter(cpu)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04-cuda11.8.0-cudnn8','jupyter(gpu)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-bigdata', 'jupyter(bigdata)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-machinelearning', 'jupyter(machinelearning)'],
|
||||
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-deeplearning', 'jupyter(deeplearning)'],
|
||||
@ -34,7 +34,7 @@ NOTEBOOK_IMAGES=[
|
||||
也可以直接run一个容器,然后安装插件后将容器commmit成镜像。
|
||||
```
|
||||
# 启动jupyter
|
||||
docker run --name jupyter -p 3000:3000 -d ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base jupyter lab --notebook-dir=/ --ip=0.0.0.0 --no-browser --allow-root --port=3000 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*'
|
||||
docker run --name jupyter -p 3000:3000 -d ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04 jupyter lab --notebook-dir=/ --ip=0.0.0.0 --no-browser --allow-root --port=3000 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*'
|
||||
|
||||
# 启动vscode
|
||||
docker run --name vscode -p 3000:3000 -d ccr.ccs.tencentyun.com/cube-studio/notebook:vscode-ubuntu-cpu-base node /home/theia/src-gen/backend/main.js /home/project --hostname=0.0.0.0 --port=3000
|
||||
|
Loading…
Reference in New Issue
Block a user