去除多余ubuntu gpu镜像

This commit is contained in:
data-infra 2023-12-10 19:47:21 +08:00
parent b74175b559
commit c2e13da815
2 changed files with 11 additions and 50 deletions

View File

@ -1,53 +1,14 @@
set -ex
hubhost=ccr.ccs.tencentyun.com/cube-studio
base_image=nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04
docker build -t $hubhost/ubuntu-gpu:cuda11.0.3-cudnn8 --build-arg FROM_IMAGES=$base_image -f cuda/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda11.0.3-cudnn8-python3.7 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda11.0.3-cudnn8 --build-arg PYTHON_VERSION=python3.7 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda11.0.3-cudnn8-python3.8 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda11.0.3-cudnn8 --build-arg PYTHON_VERSION=python3.8 -f cuda/python/Dockerfile .
docker push $hubhost/ubuntu-gpu:cuda11.0.3-cudnn8
docker push $hubhost/ubuntu-gpu:cuda11.0.3-cudnn8-python3.7
docker push $hubhost/ubuntu-gpu:cuda11.0.3-cudnn8-python3.8
base_image=nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
docker build -t $hubhost/ubuntu-gpu:cuda10.2-cudnn7 --build-arg FROM_IMAGES=$base_image -f cuda/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.2-cudnn7-python3.7 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.2-cudnn7 --build-arg PYTHON_VERSION=python3.7 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.2-cudnn7-python3.8 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.2-cudnn7 --build-arg PYTHON_VERSION=python3.8 -f cuda/python/Dockerfile .
docker push $hubhost/ubuntu-gpu:cuda10.2-cudnn7
docker push $hubhost/ubuntu-gpu:cuda10.2-cudnn7-python3.7
docker push $hubhost/ubuntu-gpu:cuda10.2-cudnn7-python3.8
base_image=nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
docker build -t $hubhost/ubuntu-gpu:cuda10.1-cudnn7 --build-arg FROM_IMAGES=$base_image -f cuda/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.1-cudnn7-python3.6 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.1-cudnn7 --build-arg PYTHON_VERSION=python3.6 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.1-cudnn7-python3.7 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.1-cudnn7 --build-arg PYTHON_VERSION=python3.7 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.1-cudnn7-python3.8 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.1-cudnn7 --build-arg PYTHON_VERSION=python3.8 -f cuda/python/Dockerfile .
docker push $hubhost/ubuntu-gpu:cuda10.1-cudnn7
docker push $hubhost/ubuntu-gpu:cuda10.1-cudnn7-python3.6
docker push $hubhost/ubuntu-gpu:cuda10.1-cudnn7-python3.7
docker push $hubhost/ubuntu-gpu:cuda10.1-cudnn7-python3.8
base_image=nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
docker build -t $hubhost/ubuntu-gpu:cuda10.0-cudnn7 --build-arg FROM_IMAGES=$base_image -f cuda/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.0-cudnn7-python3.6 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.0-cudnn7 --build-arg PYTHON_VERSION=python3.6 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.0-cudnn7-python3.7 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.0-cudnn7 --build-arg PYTHON_VERSION=python3.7 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda10.0-cudnn7-python3.8 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda10.0-cudnn7 --build-arg PYTHON_VERSION=python3.8 -f cuda/python/Dockerfile .
docker push $hubhost/ubuntu-gpu:cuda10.0-cudnn7
docker push $hubhost/ubuntu-gpu:cuda10.0-cudnn7-python3.6
docker push $hubhost/ubuntu-gpu:cuda10.0-cudnn7-python3.7
docker push $hubhost/ubuntu-gpu:cuda10.0-cudnn7-python3.8
base_image=nvidia/cuda:9.1-cudnn7-devel-ubuntu16.04
docker build -t $hubhost/ubuntu-gpu:cuda9.1-cudnn7 --build-arg FROM_IMAGES=$base_image -f cuda/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda9.1-cudnn7-python3.6 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda9.1-cudnn7 --build-arg PYTHON_VERSION=python3.6 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda9.1-cudnn7-python3.7 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda9.1-cudnn7 --build-arg PYTHON_VERSION=python3.7 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda9.1-cudnn7-python3.8 --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda9.1-cudnn7 --build-arg PYTHON_VERSION=python3.8 -f cuda/python/Dockerfile .
docker push $hubhost/ubuntu-gpu:cuda9.1-cudnn7
docker push $hubhost/ubuntu-gpu:cuda9.1-cudnn7-python3.6
docker push $hubhost/ubuntu-gpu:cuda9.1-cudnn7-python3.7
docker push $hubhost/ubuntu-gpu:cuda9.1-cudnn7-python3.8
base_image=nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
TARGETARCH=amd64
docker build -t $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-$TARGETARCH --build-arg FROM_IMAGES=$base_image -f cuda/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-python3.7-$TARGETARCH --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-$TARGETARCH --build-arg PYTHON_VERSION=python3.7 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-python3.8-$TARGETARCH --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-$TARGETARCH --build-arg PYTHON_VERSION=python3.8 -f cuda/python/Dockerfile .
docker build -t $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-python3.9-$TARGETARCH --build-arg FROM_IMAGES=$hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-$TARGETARCH --build-arg PYTHON_VERSION=python3.9 -f cuda/python/Dockerfile .
docker push $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-$TARGETARCH
docker push $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-python3.7-$TARGETARCH
docker push $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-python3.8-$TARGETARCH
docker push $hubhost/ubuntu-gpu:cuda11.8.0-cudnn8-python3.9-$TARGETARCH

View File

@ -4,7 +4,7 @@ FROM ${FROM_IMAGES}
ARG PYTHON_VERSION
# 安装python
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt update && apt install -y libsasl2-dev libpq-dev python3-pip python3-distutils
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt update && apt install -y libsasl2-dev libpq-dev python3-pip $PYTHON_VERSION-distutils
RUN set -x; rm -rf /usr/bin/python; apt install -y --fix-missing ${PYTHON_VERSION} && ln -s /usr/bin/${PYTHON_VERSION} /usr/bin/python
RUN bash -c "wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --ignore-installed" \