diff --git a/.cirrus.star b/.cirrus.star index 4360598..0ba90b7 100644 --- a/.cirrus.star +++ b/.cirrus.star @@ -12,6 +12,7 @@ load("cirrus", "env", "fs", "http") def main(ctx): file = '' - file += fs.read("tools/ci/cirrus_deploy_docker_manylinux2014_aarch64_cuda_12.3.yml") + # file += fs.read("tools/ci/cirrus_deploy_docker_manylinux2014_aarch64_cuda_12.3.yml") + # file += fs.read("tools/ci/cirrus_deploy_docker_manylinux_2_28_aarch64_cuda_12.3.yml") return file diff --git a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml index 9f0757d..2e72c24 100644 --- a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml +++ b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml @@ -1,15 +1,16 @@ name: deploy-docker-manylinux2014_x86_64_cuda_10.2 on: - # push: - # branches: - # - main + push: + branches: + - main release: types: - published jobs: - build-manylinux_x86_64_cuda_10_2: + build_docker: + name: manylinux2014_x86_64_cuda_10.2 runs-on: ubuntu-latest steps: - name: Checkout @@ -32,23 +33,25 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} - # test-cuda-10-2: - # runs-on: ubuntu-latest - # steps: - # - name: Install Snap - # run: | - # sudo apt update - # sudo apt install snapd - # - # - name: Install Docker - # run: | - # sudo snap install docker - # sudo groupadd -f docker - # sudo usermod -aG docker $USER - # newgrp docker - # - # - name: Pull Docker Image - # run: docker pull sameli/manylinux2014_x86_64_cuda_10.2 - # - # - name: Run Docker Image - # run: docker run -t sameli/manylinux2014_x86_64_cuda_10.2 nvcc --version + test_docker: + needs: [build_docker] + name: manylinux2014_x86_64_cuda_10.2 + runs-on: ubuntu-latest + steps: + - name: Install Snap + run: | + sudo apt update + sudo apt install snapd + + - name: Install Docker + run: | + sudo snap install docker + sudo groupadd -f docker + sudo usermod -aG docker $USER + newgrp docker + + - name: Pull Docker Image + run: docker pull sameli/manylinux2014_x86_64_cuda_10.2 + + - name: Run Docker Image + run: docker run -t sameli/manylinux2014_x86_64_cuda_10.2 nvcc --version diff --git a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml index 304b29e..c065a1e 100644 --- a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml +++ b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml @@ -1,15 +1,16 @@ name: deploy-docker-manylinux2014_x86_64_cuda_11.8 on: - # push: - # branches: - # - main + push: + branches: + - main release: types: - published jobs: - build-manylinux_x86_64_cuda_11_8: + build_docker: + name: manylinux2014_x86_64_cuda_11.8 runs-on: ubuntu-latest steps: - name: Checkout @@ -32,23 +33,25 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} - # test-cuda-11-8: - # runs-on: ubuntu-latest - # steps: - # - name: Install Snap - # run: | - # sudo apt update - # sudo apt install snapd - # - # - name: Install Docker - # run: | - # sudo snap install docker - # sudo groupadd -f docker - # sudo usermod -aG docker $USER - # newgrp docker - # - # - name: Pull Docker Image - # run: docker pull sameli/manylinux2014_x86_64_cuda_11.8 - # - # - name: Run Docker Image - # run: docker run -t sameli/manylinux2014_x86_64_cuda_11.8 nvcc --version + test_docker: + needs: [build_docker] + name: manylinux2014_x86_64_cuda_11.8 + runs-on: ubuntu-latest + steps: + - name: Install Snap + run: | + sudo apt update + sudo apt install snapd + + - name: Install Docker + run: | + sudo snap install docker + sudo groupadd -f docker + sudo usermod -aG docker $USER + newgrp docker + + - name: Pull Docker Image + run: docker pull sameli/manylinux2014_x86_64_cuda_11.8 + + - name: Run Docker Image + run: docker run -t sameli/manylinux2014_x86_64_cuda_11.8 nvcc --version diff --git a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml index 01e9f9d..d8e7dbd 100644 --- a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml +++ b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml @@ -1,15 +1,16 @@ name: deploy-docker-manylinux2014_x86_64_cuda_12.0 on: - # push: - # branches: - # - main + push: + branches: + - main release: types: - published jobs: - build-manylinux_x86_64_cuda_12_0: + build_docker: + name: manylinux2014_x86_64_cuda_12.0 runs-on: ubuntu-latest steps: - name: Checkout @@ -32,23 +33,25 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} - # test-cuda-12-0: - # runs-on: ubuntu-latest - # steps: - # - name: Install Snap - # run: | - # sudo apt update - # sudo apt install snapd - # - # - name: Install Docker - # run: | - # sudo snap install docker - # sudo groupadd -f docker - # sudo usermod -aG docker $USER - # newgrp docker - # - # - name: Pull Docker Image - # run: docker pull sameli/manylinux2014_x86_64_cuda_12.0 - # - # - name: Run Docker Image - # run: docker run -t sameli/manylinux2014_x86_64_cuda_12.0 nvcc --version + test_docker: + needs: [build_docker] + name: manylinux2014_x86_64_cuda_12.0 + runs-on: ubuntu-latest + steps: + - name: Install Snap + run: | + sudo apt update + sudo apt install snapd + + - name: Install Docker + run: | + sudo snap install docker + sudo groupadd -f docker + sudo usermod -aG docker $USER + newgrp docker + + - name: Pull Docker Image + run: docker pull sameli/manylinux2014_x86_64_cuda_12.0 + + - name: Run Docker Image + run: docker run -t sameli/manylinux2014_x86_64_cuda_12.0 nvcc --version diff --git a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml index 2f6e3fc..69c0a27 100644 --- a/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml +++ b/.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml @@ -1,15 +1,16 @@ name: deploy-docker-manylinux2014_x86_64_cuda_12.3 on: - # push: - # branches: - # - main + push: + branches: + - main release: types: - published jobs: - build-manylinux_x86_64_cuda_12_3: + build_docker: + name: manylinux2014_x86_64_cuda_12.3 runs-on: ubuntu-latest steps: - name: Checkout @@ -32,23 +33,25 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} - # test-cuda-12.3: - # runs-on: ubuntu-latest - # steps: - # - name: Install Snap - # run: | - # sudo apt update - # sudo apt install snapd - # - # - name: Install Docker - # run: | - # sudo snap install docker - # sudo groupadd -f docker - # sudo usermod -aG docker $USER - # newgrp docker - # - # - name: Pull Docker Image - # run: docker pull sameli/manylinux2014_x86_64_cuda_12.3 - # - # - name: Run Docker Image - # run: docker run -t sameli/manylinux2014_x86_64_cuda_12.3 nvcc --version + test_docker: + needs: [build_docker] + name: manylinux2014_x86_64_cuda_12.3 + runs-on: ubuntu-latest + steps: + - name: Install Snap + run: | + sudo apt update + sudo apt install snapd + + - name: Install Docker + run: | + sudo snap install docker + sudo groupadd -f docker + sudo usermod -aG docker $USER + newgrp docker + + - name: Pull Docker Image + run: docker pull sameli/manylinux2014_x86_64_cuda_12.3 + + - name: Run Docker Image + run: docker run -t sameli/manylinux2014_x86_64_cuda_12.3 nvcc --version diff --git a/.github/workflows/deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml b/.github/workflows/deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml new file mode 100644 index 0000000..d329a15 --- /dev/null +++ b/.github/workflows/deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml @@ -0,0 +1,57 @@ +name: deploy-docker-manylinux_2_28_x86_64_cuda_12.3 + +on: + push: + branches: + - main + release: + types: + - published + +jobs: + build_docker: + name: manylinux_2_28_x86_64_cuda_12.3 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push manylinux_2_28_x86_64_cuda-12.3 + id: docker_build + uses: docker/build-push-action@v3 + with: + push: true + file: ./docker/manylinux_2_28_x86_64_cuda_12.3/Dockerfile + tags: sameli/manylinux_2_28_x86_64_cuda_12.3:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} + + test_docker: + needs: [build_docker] + name: manylinux_2_28_x86_64_cuda_12.3 + runs-on: ubuntu-latest + steps: + - name: Install Snap + run: | + sudo apt update + sudo apt install snapd + + - name: Install Docker + run: | + sudo snap install docker + sudo groupadd -f docker + sudo usermod -aG docker $USER + newgrp docker + + - name: Pull Docker Image + run: docker pull sameli/manylinux_2_28_x86_64_cuda_12.3 + + - name: Run Docker Image + run: docker run -t sameli/manylinux_2_28_x86_64_cuda_12.3 nvcc --version diff --git a/docker-compose-aarch64.yml b/docker-compose-aarch64.yml index 01c76f8..047187f 100644 --- a/docker-compose-aarch64.yml +++ b/docker-compose-aarch64.yml @@ -3,3 +3,6 @@ services: manylinux2014_aarch64_cuda_12.3: build: ./docker/manylinux2014_aarch64_cuda_12.3 image: sameli/manylinux2014_aarch64_cuda_12.3 + manylinux_2_28_aarch64_cuda_12.3: + build: ./docker/manylinux_2_28_aarch64_cuda_12.3 + image: sameli/manylinux_2_28_aarch64_cuda_12.3 diff --git a/docker-compose-x86_64.yml b/docker-compose-x86_64.yml index fb4953d..87d0dfc 100644 --- a/docker-compose-x86_64.yml +++ b/docker-compose-x86_64.yml @@ -12,6 +12,9 @@ services: build: ./docker/manylinux2014_x86_64_cuda_12.0 image: sameli/manylinux2014_x86_64_cuda_12.0 - manylinux2014_x86_64_cuda_12.2: - build: ./docker/manylinux2014_x86_64_cuda_12.2 - image: sameli/manylinux2014_x86_64_cuda_12.2 + manylinux2014_x86_64_cuda_12.3: + build: ./docker/manylinux2014_x86_64_cuda_12.3 + image: sameli/manylinux2014_x86_64_cuda_12.3 + manylinux_2_28_x86_64_cuda_12.3: + build: ./docker/manylinux_2_28_x86_64_cuda_12.3 + image: sameli/manylinux_2_28_x86_64_cuda_12.3 diff --git a/docker/manylinux2014_aarch64_cuda_12.3/Dockerfile b/docker/manylinux2014_aarch64_cuda_12.3/Dockerfile index 3c9e460..c4b8704 100644 --- a/docker/manylinux2014_aarch64_cuda_12.3/Dockerfile +++ b/docker/manylinux2014_aarch64_cuda_12.3/Dockerfile @@ -29,9 +29,11 @@ ARG ARCH="aarch64" RUN yum install -y yum-utils RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/sbsa/cuda-rhel9.repo +RUN yum -y install epel-release RUN yum -y install cuda-compiler-${VER}.${ARCH} \ cuda-libraries-${VER}.${ARCH} \ cuda-libraries-devel-${VER}.${ARCH} +RUN yum -y module install nvidia-driver:latest-dkms RUN yum clean all RUN rm -rf /var/cache/yum/* RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf diff --git a/docker/manylinux_2_28_aarch64_cuda_12.3/Dockerfile b/docker/manylinux_2_28_aarch64_cuda_12.3/Dockerfile new file mode 100644 index 0000000..54e2e24 --- /dev/null +++ b/docker/manylinux_2_28_aarch64_cuda_12.3/Dockerfile @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-FileType: SOURCE + +# ----------------------------------------------------------------------------- +# How to build +# $ docker build -t sameli/manylinux_2_28_aarch64_cuda_12.3 -f . +# +# How to run: +# $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ +# manylinux_2_28_aarch64_cuda_12.3 +# ----------------------------------------------------------------------------- + +# ----------------- +# Choose base image +# ----------------- + +FROM quay.io/pypa/manylinux_2_28_aarch64 + +MAINTAINER Siavash Ameli +LABEL Description="manylinux_2_28_aarch64 with cuda 12.3" + +# ------------ +# Install cuda +# ------------ + +ARG VER="12-3" +ARG ARCH="aarch64" + +RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo +RUN dnf -y install epel-release +RUN dnf -y install cuda-compiler-${VER}.${ARCH} \ + cuda-libraries-${VER}.${ARCH} \ + cuda-libraries-devel-${VER}.${ARCH} +RUN dnf -y module install nvidia-driver:latest-dkms +RUN dnf clean all +RUN rm -rf /var/cache/dnf/* +RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf + +# ------------------------- +# Set environment variables +# ------------------------- + +ENV PATH="/usr/local/cuda/bin:${PATH}" +ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" +ENV CUDA_HOME=/usr/local/cuda +ENV CUDA_ROOT=/usr/local/cuda +ENV CUDA_PATH=/usr/local/cuda +ENV CUDADIR=/usr/local/cuda + +# -------- +# Commands +# -------- + +CMD ["/bin/bash"] diff --git a/docker/manylinux_2_28_x86_64_cuda_12.3/Dockerfile b/docker/manylinux_2_28_x86_64_cuda_12.3/Dockerfile new file mode 100644 index 0000000..c47e947 --- /dev/null +++ b/docker/manylinux_2_28_x86_64_cuda_12.3/Dockerfile @@ -0,0 +1,55 @@ +# SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-FileType: SOURCE + +# ----------------------------------------------------------------------------- +# How to build +# $ docker build -t sameli/manylinux_2_28_x86_64_cuda_12.3 -f . +# +# How to run: +# $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ +# manylinux_2_28_x86_64_cuda_12.3 +# ----------------------------------------------------------------------------- + +# ----------------- +# Choose base image +# ----------------- + +FROM quay.io/pypa/manylinux_2_28_x86_64 + +MAINTAINER Siavash Ameli +LABEL Description="manylinux_2_28_x86_64 with cuda 12.3" + +# ------------ +# Install cuda +# ------------ + +ARG VER="12-3" +ARG ARCH="x86_64" + +RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo +RUN dnf -y install epel-release +RUN dnf -y install cuda-compiler-${VER}.${ARCH} \ + cuda-libraries-${VER}.${ARCH} \ + cuda-libraries-devel-${VER}.${ARCH} +RUN dnf -y module install nvidia-driver:latest-dkms +RUN dnf clean all +RUN rm -rf /var/cache/dnf/* +RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf + +# ------------------------- +# Set environment variables +# ------------------------- + +ENV PATH="/usr/local/cuda/bin:${PATH}" +ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" +ENV CUDA_HOME=/usr/local/cuda +ENV CUDA_ROOT=/usr/local/cuda +ENV CUDA_PATH=/usr/local/cuda +ENV CUDADIR=/usr/local/cuda + +# -------- +# Commands +# -------- + +CMD ["/bin/bash"] diff --git a/tools/ci/cirrus_deploy_docker_manylinux_2_28_aarch64_cuda_12.3.yml b/tools/ci/cirrus_deploy_docker_manylinux_2_28_aarch64_cuda_12.3.yml new file mode 100644 index 0000000..5ee9c38 --- /dev/null +++ b/tools/ci/cirrus_deploy_docker_manylinux_2_28_aarch64_cuda_12.3.yml @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli +# SPDX-License-Identifier: BSD-3-Clause +# SPDX-FileType: SOURCE +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the license found in the LICENSE.txt file in the root +# directory of this source tree. + + +# ===================================== +# manylinux 2_28 aarch64 cuda 12.3 cibw +# ===================================== + +manylinux_2_28_aarch64_cuda_12_3_cibw: &MANYLINUX_2_28_AARCH64_CUDA_12_3_CIBW + install_cibuildwheel_script: + - python -m pip install cibuildwheel + cibuildwheel_script: + - cibuildwheel + conda_linux_aarch64_wheels_artifacts: + path: "wheelhouse/*.whl" + + +# ============================================= +# build docker manylinux 2_28 aarch64 cuda 12-3 +# ============================================= + +build_docker_manylinux_2_28_aarch64_cuda_12_3_task: + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + compute_engine_instance: + image_project: cirrus-images + image: family/docker-builder-arm64 + architecture: arm64 + platform: linux + cpu: 1 + memory: 8G + env: + DOCKERHUB_TOKEN: ENCRYPTED[!05c76b305df7bb81c59faa33981e2cf4d08c4aa6f1c0313645815c5729f42b6d9db7f2829260ca8cb1e92637151670ad!] + + build_script: | + + # Install docker + source ./tools/scripts/docker_utils.sh + install_docker + + # Build source + docker build -t sameli/manylinux_2_28_aarch64_cuda_12.3 -f ./docker/manylinux_2_28_aarch64_cuda_12.3/Dockerfile . + + docker images + + # Upload image to dockerhub + DOCKERHUB_USERNAME="sameli" + docker login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_TOKEN} + + # Upload to dockerhub + docker push sameli/manylinux_2_28_aarch64_cuda_12.3 + + +# ============================================ +# test docker manylinux 2_28 aarch64 cuda 12-3 +# ============================================ + +test_docker_manylinux_2_28_aarch64_cuda_12_3_task: + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + compute_engine_instance: + image_project: cirrus-images + image: family/docker-builder-arm64 + architecture: arm64 + platform: linux + cpu: 1 + memory: 8G + depends_on: + - build_docker_manylinux_2_28_aarch64_cuda_12_3 + + test_script: | + + # Install docker + source ./tools/scripts/docker_utils.sh + install_docker + + # Test dockerhub image + docker run -t sameli/manylinux_2_28_aarch64_cuda_12.3 nvcc --version