From 0bfa180f7d90b1483b676b4dd4f6bf2caf36891b Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Tue, 1 Apr 2025 15:38:26 -0400 Subject: [PATCH] torch 2.7.0 base image for testing (#2467) --- .github/workflows/base.yml | 8 +++++++- docker/Dockerfile-base-next | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfile-base-next diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 01b898310..30859a374 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -52,6 +52,12 @@ jobs: python_version: "3.11" pytorch: nightly torch_cuda_arch_list: "7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX" + - cuda: "128" + cuda_version: 12.8.1 + cudnn_version: "" + python_version: "3.11" + pytorch: next + torch_cuda_arch_list: "7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX" steps: - name: Checkout uses: actions/checkout@v4 @@ -73,7 +79,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - file: ${{ matrix.pytorch == 'nightly' && './docker/Dockerfile-base-nightly' || './docker/Dockerfile-base' }} + file: ${{ matrix.pytorch == 'nightly' && './docker/Dockerfile-base-nightly' || matrix.pytorch == 'next' && './docker/Dockerfile-base-next' || './docker/Dockerfile-base' }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} labels: ${{ steps.metadata.outputs.labels }} diff --git a/docker/Dockerfile-base-next b/docker/Dockerfile-base-next new file mode 100644 index 000000000..a968b5913 --- /dev/null +++ b/docker/Dockerfile-base-next @@ -0,0 +1,38 @@ +ARG CUDA_VERSION="12.8.1" +ARG CUDNN_VERSION="8" +ARG UBUNTU_VERSION="22.04" +ARG MAX_JOBS=4 + +FROM nvidia/cuda:$CUDA_VERSION-cudnn$CUDNN_VERSION-devel-ubuntu$UBUNTU_VERSION AS base-builder + +ENV PATH="/root/miniconda3/bin:${PATH}" + +ARG PYTHON_VERSION="3.11" +ARG PYTORCH_VERSION="next" +ARG CUDA="128" +ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX" + +ENV PYTHON_VERSION=$PYTHON_VERSION +ENV TORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST + +RUN apt-get update \ + && apt-get install -y wget git build-essential ninja-build git-lfs libaio-dev pkg-config && rm -rf /var/lib/apt/lists/* \ + && wget \ + https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ + && mkdir /root/.conda \ + && bash Miniconda3-latest-Linux-x86_64.sh -b \ + && rm -f Miniconda3-latest-Linux-x86_64.sh \ + && conda create -n "py${PYTHON_VERSION}" python="${PYTHON_VERSION}" + +ENV PATH="/root/miniconda3/envs/py${PYTHON_VERSION}/bin:${PATH}" + +WORKDIR /workspace + +RUN python3 -m pip install --upgrade pip && pip3 install packaging && \ + python3 -m pip install --no-cache-dir -U torch==2.7.0 --extra-index-url https://download.pytorch.org/whl/test/cu$CUDA && \ + python3 -m pip install --no-cache-dir "causal_conv1d @ git+https://github.com/Dao-AILab/causal-conv1d.git@main" && \ + python3 -m pip install --no-cache-dir "mamba_ssm @ git+https://github.com/state-spaces/mamba.git@main" + +RUN git lfs install --skip-repo && \ + pip3 install awscli && \ + pip3 install -U --no-cache-dir pydantic==2.10.6