Skip to content

Commit 5938fa8

Browse files
committed
升级20240801版本
1 parent 958488d commit 5938fa8

File tree

152 files changed

+9768
-11104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+9768
-11104
lines changed

images/jupyter-notebook/Dockerfile-ubuntu-conda

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ FROM $FROM_IMAGES
44

55
ARG PYTHONVERSION
66
ARG CONDAENV
7+
ARG CUDAVERSION=cu118
8+
ARG TARGETARCH=amd64
79

8-
RUN apt update
910
ENV TZ Asia/Shanghai
1011
ENV DEBIAN_FRONTEND noninteractive
1112

13+
RUN apt update -y
1214
# 安装运维工具
1315
RUN apt install -y -f --no-install-recommends vim apt-transport-https gnupg2 ca-certificates-java rsync jq wget git dnsutils iputils-ping net-tools curl mysql-client locales zip unzip nginx lsof
1416

@@ -24,10 +26,18 @@ RUN echo "alias ll='ls -alF'" >> /root/.bashrc && \
2426
echo "alias vi='vim'" >> /root/.bashrc && \
2527
/bin/bash -c "source /root/.bashrc"
2628

27-
# 安装anaconda
28-
RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
29-
mkdir /root/.conda && bash Miniconda3-latest-Linux-x86_64.sh -b && \
30-
rm -f Miniconda3-latest-Linux-x86_64.sh
29+
# 安装amd64的conda
30+
RUN if [ "$TARGETARCH" = "amd64" ]; then \
31+
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh; \
32+
mkdir /root/.conda && bash Miniconda3-latest-Linux-x86_64.sh -b ; \
33+
rm -f Miniconda3-latest-Linux-x86_64.sh ; \
34+
fi
35+
# 安装arm64的conda
36+
RUN if [ "$TARGETARCH" = "arm64" ]; then \
37+
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-aarch64.sh ; \
38+
mkdir /root/.conda && bash Miniconda3-latest-Linux-aarch64.sh -b ; \
39+
rm -f Miniconda3-latest-Linux-aarch64.sh ; \
40+
fi
3141

3242
# 激活python3
3343
ENV PATH "/root/miniconda3/bin":$PATH
@@ -45,10 +55,11 @@ RUN apt install -y openssh-server openssh-client
4555

4656
# 安装
4757
RUN apt install -y -f python3-opencv ffmpeg
58+
COPY pip.conf /root/.pip/pip.conf
4859
RUN pip3 install celery redis pyarrow requests_toolbelt cryptography tqdm fsspec aiohttp librosa flask werkzeug requests tornado Pillow pysnooper opencv-python numpy scipy matplotlib scikit-image ipython pyyaml visualdl filelock && rm -rf ~/.cache
4960

50-
RUN pip install --upgrade pip && pip install tornado==6.2 gsutil simplejson sqlalchemy joblib scikit-learn jinja2 requests numpy pandas flask pymysql pysnooper pyyaml jupyterlab==3.4.8 voila notebook==6.4.12 && rm -rf /tmp/* /var/tmp/* /root/.cache \
51-
61+
RUN pip install --upgrade pip && pip install tornado==6.2 gsutil simplejson sqlalchemy joblib scikit-learn jinja2 requests numpy pandas flask pymysql pysnooper pyyaml jupyterlab==3.4.8 voila notebook==6.4.12 && rm -rf /tmp/* /var/tmp/* /root/.cache
62+
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/${CUDAVERSION} && rm -rf /tmp/* /var/tmp/* /root/.cache
5263
#RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
5364
#RUN pip install --upgrade jupyterlab-git jupyterlab_tensorboard_pro && jupyter lab build && jupyter labextension install jupyterlab_tensorboard_pro && jupyter serverextension enable jupyterlab_tensorboard_pro --sys-prefix
5465

images/jupyter-notebook/build.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
set -ex
2+
TARGETARCH=amd64
23

34
hubhost=ccr.ccs.tencentyun.com/cube-studio
4-
base_image=ubuntu:22.04
5-
docker build -t $hubhost/notebook:jupyter-ubuntu22.04 --build-arg FROM_IMAGES=$base_image --build-arg PYTHONVERSION=3.8 --build-arg CONDAENV=python38 -f Dockerfile-ubuntu-conda .
6-
docker push $hubhost/notebook:jupyter-ubuntu22.04
75

8-
base_image=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
9-
docker build -t $hubhost/notebook:jupyter-ubuntu22.04-cuda11.8.0-cudnn8 --build-arg FROM_IMAGES=$base_image --build-arg PYTHONVERSION=3.8 --build-arg CONDAENV=python38 -f Dockerfile-ubuntu-conda .
10-
docker push $hubhost/notebook:jupyter-ubuntu22.04-cuda11.8.0-cudnn8
6+
base_image=ubuntu:20.04
7+
docker build --network=host -t $hubhost/notebook-enterprise:jupyter-ubuntu-cpu-conda-$TARGETARCH --build-arg FROM_IMAGES=$base_image --build-arg PYTHONVERSION=3.9 --build-arg CONDAENV=python39 --build-arg TARGETARCH=$TARGETARCH -f Dockerfile-ubuntu-conda .
8+
docker push $hubhost/notebook-enterprise:jupyter-ubuntu-cpu-conda-$TARGETARCH
9+
10+
base_image=nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
11+
docker build --network=host -t $hubhost/notebook-enterprise:jupyter-ubuntu-gpu-conda-$TARGETARCH --build-arg FROM_IMAGES=$base_image --build-arg PYTHONVERSION=3.9 --build-arg CONDAENV=python39 --build-arg TARGETARCH=$TARGETARCH --build-arg CUDAVERSION=cu118 -f Dockerfile-ubuntu-conda .
12+
docker push $hubhost/notebook-enterprise:jupyter-ubuntu-gpu-conda-$TARGETARCH
13+
14+
base_image=nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04
15+
docker build --network=host -t $hubhost/notebook-enterprise:jupyter-ubuntu-gpu-conda-12.1.0-cudnn8-$TARGETARCH --build-arg FROM_IMAGES=$base_image --build-arg PYTHONVERSION=3.9 --build-arg CONDAENV=python39 --build-arg TARGETARCH=$TARGETARCH --build-arg CUDAVERSION=cu121 -f Dockerfile-ubuntu-conda .
16+
docker push $hubhost/notebook-enterprise:jupyter-ubuntu-gpu-conda-12.1.0-cudnn8-$TARGETARCH
1117

1218

images/jupyter-notebook/init.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ echo root:cube-studio | chpasswd
99
service ssh restart
1010
# 客户端连接命令, ssh -p ${SSH_PORT} root@${SERVICE_EXTERNAL_IP}
1111

12+
#sed -i "s/Host cube-studio/Host ${NOTEBOOK_NAME}/g" /examples/ssh连接
1213
sed -i "s/localhost/${SERVICE_EXTERNAL_IP}/g" /examples/ssh连接
1314
sed -i "s/localport/${SSH_PORT}/g" /examples/ssh连接
15+
sed -i "s/hostname/cube-studio-${NOTEBOOK_NAME}/g" /examples/ssh连接
1416

1517
# 配置example
1618
ln -s /examples /mnt/${USERNAME}/

images/jupyter-notebook/pip.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[global]
2+
index-url = https://mirrors.aliyun.com/pypi/simple

images/jupyter-notebook/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ vscode镜像的构建在:https://github.com/tencentmusic/cube-studio/tree/mast
2222
NOTEBOOK_IMAGES=[
2323
['ccr.ccs.tencentyun.com/cube-studio/notebook:vscode-ubuntu-cpu-base', 'vscode(cpu)'],
2424
['ccr.ccs.tencentyun.com/cube-studio/notebook:vscode-ubuntu-gpu-base', 'vscode(gpu)'],
25-
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04', 'jupyter(cpu)'],
26-
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu22.04-cuda11.8.0-cudnn8','jupyter(gpu)'],
25+
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-cpu-base', 'jupyter(cpu)'],
26+
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-gpu-base','jupyter(gpu)'],
2727
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-bigdata', 'jupyter(bigdata)'],
2828
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-machinelearning', 'jupyter(machinelearning)'],
2929
['ccr.ccs.tencentyun.com/cube-studio/notebook:jupyter-ubuntu-deeplearning', 'jupyter(deeplearning)'],
@@ -34,7 +34,7 @@ NOTEBOOK_IMAGES=[
3434
也可以直接run一个容器,然后安装插件后将容器commmit成镜像。
3535
```
3636
# 启动jupyter
37-
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='*'
37+
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='*'
3838
3939
# 启动vscode
4040
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

images/mul-cuda/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# docker build -t ccr.ccs.tencentyun.com/cube-studio/gpu:ubuntu18.04-python3.6-cuda10.1-cuda10.0-cuda9.0-cudnn7.6 .
1+
# docker build --network=host -t ccr.ccs.tencentyun.com/cube-studio/gpu:ubuntu18.04-python3.6-cuda10.1-cuda10.0-cuda9.0-cudnn7.6 .
22

33
FROM ccr.ccs.tencentyun.com/cube-studio/gpu:ubuntu18.04-python3.6-cuda10.1-cuda10.0-cuda9.0-cudnn7.6-base
44
WORKDIR /

images/mul-cuda/ubuntu/Dockerfile-base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# docker build -t ccr.ccs.tencentyun.com/cube-studio/gpu:ubuntu18.04-python3.6-cuda10.1-cuda10.0-cuda9.0-cudnn7.6-base .
2+
# docker build --network=host -t ccr.ccs.tencentyun.com/cube-studio/gpu:ubuntu18.04-python3.6-cuda10.1-cuda10.0-cuda9.0-cudnn7.6-base .
33

44
# 手动安装了各种cuda
55
# https://developer.nvidia.com/cuda-toolkit-archive 安装不上

images/ubuntu-gpu/cuda/python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ RUN set -x; rm -rf /usr/bin/python /usr/bin/python3; apt install -y --fix-missin
1010
RUN bash -c "wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --ignore-installed" \
1111
&& rm -rf /usr/bin/pip && ln -s /usr/bin/pip3 /usr/bin/pip
1212

13-
RUN pip install -U pip && pip install flask requests kubernetes numpy pandas tornado pysnooper
13+
RUN pip install -U pip && pip install flask requests kubernetes numpy pandas tornado pysnooper redis
1414

1515

install/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# docker build -t ccr.ccs.tencentyun.com/cube-studio/kubeflow-dashboard:2024.07.01 -f install/docker/Dockerfile .
1+
# docker build -t ccr.ccs.tencentyun.com/cube-studio/kubeflow-dashboard:2024.08.01 -f install/docker/Dockerfile .
22

33
FROM ccr.ccs.tencentyun.com/cube-studio/kubeflow-dashboard:base-python3.9-amd64-20231001
44

install/docker/Dockerfile-base

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ ENV LC_ALL zh_CN.UTF-8
3434
ENV LANGUAGE zh_CN.UTF-8
3535

3636
# 便捷操作
37-
RUN echo "alias ll='ls -alF'" >> /etc/profile && \
38-
echo "alias la='ls -A'" >> /etc/profile && \
39-
echo "alias vi='vim'" >> /etc/profile
37+
RUN echo "alias ll='ls -alF'" >> ~/.bashrc && \
38+
echo "alias la='ls -A'" >> ~/.bashrc && \
39+
echo "alias vi='vim'" >> ~/.bashrc
4040

4141
COPY install/docker/requirements.txt /requirements.txt
4242

0 commit comments

Comments
 (0)