diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 58de50af..2db535c2 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -27,9 +27,9 @@ on: description: 'Other params in --xxx xxx' required: false python_version: - description: 'Python version to use, default is 3.11.11' + description: 'Python version to use, default is 3.12.13' required: false - default: '3.11.11' + default: '3.12.13' run-name: Docker-${{ inputs.modelscope_branch }}-${{ inputs.image_type }}-${{ inputs.workflow_name }}-${{ inputs.python_version }}-by-@${{ github.actor }} diff --git a/docker/Dockerfile.extra_install b/docker/Dockerfile.extra_install index 3a8db4e5..6aafdb4f 100644 --- a/docker/Dockerfile.extra_install +++ b/docker/Dockerfile.extra_install @@ -32,13 +32,13 @@ RUN wget -O /tmp/boost.tar.gz https://archives.boost.io/release/1.80.0/source/bo #install and config python copy from https://github.com/docker-library/python/blob/1b7a1106674a21e699b155cbd53bf39387284cca/3.10/bookworm/Dockerfile ARG PYTHON_VERSION={python_version} ENV PATH /usr/local/bin:$PATH -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV GPG_KEY="A035C8C19219BA821ECEA86B64E628F8D684696D 7169605F62C751356D054A26A821E680E5FA6305" ENV PYTHON_VERSION {python_version} #install and config python copy from https://github.com/docker-library/python/blob/1b7a1106674a21e699b155cbd53bf39387284cca/3.10/bookworm/Dockerfile ARG PYTHON_VERSION={python_version} ENV PATH /usr/local/bin:$PATH -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV GPG_KEY="A035C8C19219BA821ECEA86B64E628F8D684696D 7169605F62C751356D054A26A821E680E5FA6305" ENV PYTHON_VERSION {python_version} RUN set -eux; \ @@ -46,7 +46,7 @@ RUN set -eux; \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys "$GPG_KEY"; \ + gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys $GPG_KEY; \ gpg --batch --verify python.tar.xz.asc python.tar.xz; \ gpgconf --kill all; \ rm -rf "$GNUPGHOME" python.tar.xz.asc; \ @@ -112,9 +112,9 @@ RUN set -eux; \ done # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 +ENV PYTHON_PIP_VERSION 24.3.1 # https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 +ENV PYTHON_SETUPTOOLS_VERSION 75.8.2 # https://github.com/pypa/get-pip ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/dbf0c85f76fb6e1ab42aa672ffca6f0a675d9ee4/public/get-pip.py ENV PYTHON_GET_PIP_SHA256 dfe9fd5c28dc98b5ac17979a953ea550cec37ae1b47a5116007395bfacff2ab9 diff --git a/docker/Dockerfile.ubuntu_base b/docker/Dockerfile.ubuntu_base index 0cd5b896..1859dbcd 100644 --- a/docker/Dockerfile.ubuntu_base +++ b/docker/Dockerfile.ubuntu_base @@ -35,7 +35,7 @@ RUN wget -O /tmp/boost.tar.gz https://archives.boost.io/release/1.80.0/source/bo #install and config python copy from https://github.com/docker-library/python/blob/1b7a1106674a21e699b155cbd53bf39387284cca/3.10/bookworm/Dockerfile ARG PYTHON_VERSION={python_version} ENV PATH /usr/local/bin:$PATH -ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D +ENV GPG_KEY="A035C8C19219BA821ECEA86B64E628F8D684696D 7169605F62C751356D054A26A821E680E5FA6305" ENV PYTHON_VERSION {python_version} RUN set -eux; \ @@ -43,7 +43,7 @@ RUN set -eux; \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys "$GPG_KEY"; \ + gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys $GPG_KEY; \ gpg --batch --verify python.tar.xz.asc python.tar.xz; \ gpgconf --kill all; \ rm -rf "$GNUPGHOME" python.tar.xz.asc; \ @@ -112,9 +112,9 @@ RUN set -eux; \ done # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 +ENV PYTHON_PIP_VERSION 24.3.1 # https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 +ENV PYTHON_SETUPTOOLS_VERSION 75.8.2 # https://github.com/pypa/get-pip ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/dbf0c85f76fb6e1ab42aa672ffca6f0a675d9ee4/public/get-pip.py ENV PYTHON_GET_PIP_SHA256 dfe9fd5c28dc98b5ac17979a953ea550cec37ae1b47a5116007395bfacff2ab9 diff --git a/docker/build_image.py b/docker/build_image.py index 20a1f0a9..cbc463ec 100644 --- a/docker/build_image.py +++ b/docker/build_image.py @@ -22,7 +22,7 @@ class Builder: def init_args(self, args: Any) -> Any: if not args.base_image: # A mirrored image of nvidia/cuda:12.4.0-devel-ubuntu22.04 - args.base_image = 'nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04' + args.base_image = 'nvidia/cuda:12.9.1-cudnn-devel-ubuntu22.04' if not args.torch_version: args.torch_version = '2.9.1' args.torchaudio_version = '2.9.1' @@ -32,7 +32,7 @@ class Builder: if not args.tf_version: args.tf_version = '2.16.1' if not args.cuda_version: - args.cuda_version = '12.8.1' + args.cuda_version = '12.9.1' if not args.vllm_version: args.vllm_version = '0.15.1' if not args.lmdeploy_version: @@ -393,8 +393,12 @@ class LatestGPUImageBuilder(StableGPUImageBuilder): """Dependencies will be latest versions""" def init_args(self, args: Any) -> Any: + if not args.torch_version: + args.torch_version = '2.10.0' + args.torchaudio_version = '2.10.0' + args.torchvision_version = '0.25.0' if not args.vllm_version: - args.vllm_version = '0.16.0' + args.vllm_version = '0.19.0' return super().init_args(args) def generate_dockerfile(self) -> str: @@ -487,7 +491,7 @@ RUN pip install --no-cache-dir -U icecream soundfile pybind11 py-spy parser = argparse.ArgumentParser() parser.add_argument('--base_image', type=str, default=None) parser.add_argument('--image_type', type=str) -parser.add_argument('--python_version', type=str, default='3.11.11') +parser.add_argument('--python_version', type=str, default='3.12.13') parser.add_argument('--ubuntu_version', type=str, default='22.04') parser.add_argument('--torch_version', type=str, default=None) parser.add_argument('--torchvision_version', type=str, default=None) diff --git a/docker/install.sh b/docker/install.sh index 14066872..b39f2137 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -10,9 +10,7 @@ flashattn_version=${7:-2.7.1.post4} pip uninstall -y torch torchvision torchaudio -pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version - -pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version +pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version --index-url https://download.pytorch.org/whl/cu129 pip install --no-cache-dir tiktoken transformers_stream_generator bitsandbytes deepspeed torchmetrics decord optimum openai-whisper