├── .cirrus.star ├── .github └── workflows │ ├── deploy-docker-manylinux2014_x86_64_cuda_10.2.yml │ ├── deploy-docker-manylinux2014_x86_64_cuda_11.8.yml │ ├── deploy-docker-manylinux2014_x86_64_cuda_12.0.yml │ ├── deploy-docker-manylinux2014_x86_64_cuda_12.3.yml │ ├── deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml │ └── deploy-docker-manylinux_2_34_x86_64_cuda_12.8.yml ├── .gitignore ├── AUTHORS.txt ├── LICENSE ├── README.rst ├── docker-compose-aarch64.yml ├── docker-compose-x86_64.yml ├── docker ├── manylinux2014_aarch64_cuda_12.9 │ └── Dockerfile ├── manylinux2014_x86_64_cuda_10.2 │ └── Dockerfile ├── manylinux2014_x86_64_cuda_11.8 │ └── Dockerfile ├── manylinux2014_x86_64_cuda_12.0 │ └── Dockerfile ├── manylinux2014_x86_64_cuda_12.3 │ └── Dockerfile ├── manylinux_2_28_x86_64_cuda_12.3 │ └── Dockerfile ├── manylinux_2_34_aarch64_cuda_12.9 │ └── Dockerfile └── manylinux_2_34_x86_64_cuda_12.8 │ └── Dockerfile └── tools ├── ci ├── cirrus_deploy_docker_manylinux2014_aarch64_cuda_12.9.yml └── cirrus_deploy_docker_manylinux_2_34_aarch64_cuda_12.9.yml └── scripts └── docker_utils.sh /.cirrus.star: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | # 5 | # This program is free software: you can redistribute it and/or modify it 6 | # under the terms of the license found in the LICENSE.txt file in the root 7 | # directory of this source tree. 8 | 9 | 10 | load("cirrus", "env", "fs", "http") 11 | 12 | def main(ctx): 13 | 14 | file = '' 15 | file += fs.read("tools/ci/cirrus_deploy_docker_manylinux2014_aarch64_cuda_12.9.yml") 16 | file += fs.read("tools/ci/cirrus_deploy_docker_manylinux_2_34_aarch64_cuda_12.9.yml") 17 | 18 | return file 19 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docker-manylinux2014_x86_64_cuda_10.2 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | build_docker: 13 | name: build 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v3 21 | with: 22 | username: ${{ secrets.DOCKERHUB_USERNAME }} 23 | password: ${{ secrets.DOCKERHUB_TOKEN }} 24 | 25 | - name: Build and push manylinux2014_x86_64_cuda-10.2 26 | id: docker_build 27 | uses: docker/build-push-action@v5 28 | with: 29 | push: true 30 | file: ./docker/manylinux2014_x86_64_cuda_10.2/Dockerfile 31 | tags: sameli/manylinux2014_x86_64_cuda_10.2:latest 32 | 33 | - name: Image digest 34 | run: echo ${{ steps.docker_build.outputs.digest }} 35 | 36 | test_docker: 37 | needs: [build_docker] 38 | name: test 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Install Snap 42 | run: | 43 | sudo apt update 44 | sudo apt install snapd 45 | 46 | - name: Install Docker 47 | run: | 48 | sudo snap install docker 49 | sudo groupadd -f docker 50 | sudo usermod -aG docker $USER 51 | newgrp docker 52 | 53 | - name: Pull Docker Image 54 | run: docker pull sameli/manylinux2014_x86_64_cuda_10.2 55 | 56 | - name: Run Docker Image 57 | run: docker run -t sameli/manylinux2014_x86_64_cuda_10.2 nvcc --version 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docker-manylinux2014_x86_64_cuda_11.8 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | build_docker: 13 | name: build 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v3 21 | with: 22 | username: ${{ secrets.DOCKERHUB_USERNAME }} 23 | password: ${{ secrets.DOCKERHUB_TOKEN }} 24 | 25 | - name: Build and push manylinux2014_x86_64_cuda-11.8 26 | id: docker_build 27 | uses: docker/build-push-action@v5 28 | with: 29 | push: true 30 | file: ./docker/manylinux2014_x86_64_cuda_11.8/Dockerfile 31 | tags: sameli/manylinux2014_x86_64_cuda_11.8:latest 32 | 33 | - name: Image digest 34 | run: echo ${{ steps.docker_build.outputs.digest }} 35 | 36 | test_docker: 37 | needs: [build_docker] 38 | name: test 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Install Snap 42 | run: | 43 | sudo apt update 44 | sudo apt install snapd 45 | 46 | - name: Install Docker 47 | run: | 48 | sudo snap install docker 49 | sudo groupadd -f docker 50 | sudo usermod -aG docker $USER 51 | newgrp docker 52 | 53 | - name: Pull Docker Image 54 | run: docker pull sameli/manylinux2014_x86_64_cuda_11.8 55 | 56 | - name: Run Docker Image 57 | run: docker run -t sameli/manylinux2014_x86_64_cuda_11.8 nvcc --version 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docker-manylinux2014_x86_64_cuda_12.0 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | build_docker: 13 | name: build 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v3 21 | with: 22 | username: ${{ secrets.DOCKERHUB_USERNAME }} 23 | password: ${{ secrets.DOCKERHUB_TOKEN }} 24 | 25 | - name: Build and push manylinux2014_x86_64_cuda-12.0 26 | id: docker_build 27 | uses: docker/build-push-action@v5 28 | with: 29 | push: true 30 | file: ./docker/manylinux2014_x86_64_cuda_12.0/Dockerfile 31 | tags: sameli/manylinux2014_x86_64_cuda_12.0:latest 32 | 33 | - name: Image digest 34 | run: echo ${{ steps.docker_build.outputs.digest }} 35 | 36 | test_docker: 37 | needs: [build_docker] 38 | name: test 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Install Snap 42 | run: | 43 | sudo apt update 44 | sudo apt install snapd 45 | 46 | - name: Install Docker 47 | run: | 48 | sudo snap install docker 49 | sudo groupadd -f docker 50 | sudo usermod -aG docker $USER 51 | newgrp docker 52 | 53 | - name: Pull Docker Image 54 | run: docker pull sameli/manylinux2014_x86_64_cuda_12.0 55 | 56 | - name: Run Docker Image 57 | run: docker run -t sameli/manylinux2014_x86_64_cuda_12.0 nvcc --version 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docker-manylinux2014_x86_64_cuda_12.3 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | build_docker: 13 | name: build 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v3 21 | with: 22 | username: ${{ secrets.DOCKERHUB_USERNAME }} 23 | password: ${{ secrets.DOCKERHUB_TOKEN }} 24 | 25 | - name: Build and push manylinux2014_x86_64_cuda-12.3 26 | id: docker_build 27 | uses: docker/build-push-action@v5 28 | with: 29 | push: true 30 | file: ./docker/manylinux2014_x86_64_cuda_12.3/Dockerfile 31 | tags: sameli/manylinux2014_x86_64_cuda_12.3:latest 32 | 33 | - name: Image digest 34 | run: echo ${{ steps.docker_build.outputs.digest }} 35 | 36 | test_docker: 37 | needs: [build_docker] 38 | name: test 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Install Snap 42 | run: | 43 | sudo apt update 44 | sudo apt install snapd 45 | 46 | - name: Install Docker 47 | run: | 48 | sudo snap install docker 49 | sudo groupadd -f docker 50 | sudo usermod -aG docker $USER 51 | newgrp docker 52 | 53 | - name: Pull Docker Image 54 | run: docker pull sameli/manylinux2014_x86_64_cuda_12.3 55 | 56 | - name: Run Docker Image 57 | run: docker run -t sameli/manylinux2014_x86_64_cuda_12.3 nvcc --version 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docker-manylinux_2_28_x86_64_cuda_12.3 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | build_docker: 13 | name: build 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v3 21 | with: 22 | username: ${{ secrets.DOCKERHUB_USERNAME }} 23 | password: ${{ secrets.DOCKERHUB_TOKEN }} 24 | 25 | - name: Build and push manylinux_2_28_x86_64_cuda-12.3 26 | id: docker_build 27 | uses: docker/build-push-action@v5 28 | with: 29 | push: true 30 | file: ./docker/manylinux_2_28_x86_64_cuda_12.3/Dockerfile 31 | tags: sameli/manylinux_2_28_x86_64_cuda_12.3:latest 32 | 33 | - name: Image digest 34 | run: echo ${{ steps.docker_build.outputs.digest }} 35 | 36 | test_docker: 37 | needs: [build_docker] 38 | name: test 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Install Snap 42 | run: | 43 | sudo apt update 44 | sudo apt install snapd 45 | 46 | - name: Install Docker 47 | run: | 48 | sudo snap install docker 49 | sudo groupadd -f docker 50 | sudo usermod -aG docker $USER 51 | newgrp docker 52 | 53 | - name: Pull Docker Image 54 | run: docker pull sameli/manylinux_2_28_x86_64_cuda_12.3 55 | 56 | - name: Run Docker Image 57 | run: docker run -t sameli/manylinux_2_28_x86_64_cuda_12.3 nvcc --version 58 | -------------------------------------------------------------------------------- /.github/workflows/deploy-docker-manylinux_2_34_x86_64_cuda_12.8.yml: -------------------------------------------------------------------------------- 1 | name: deploy-docker-manylinux_2_34_x86_64_cuda_12.8 2 | 3 | on: 4 | # push: 5 | # branches: 6 | # - main 7 | release: 8 | types: 9 | - published 10 | 11 | jobs: 12 | build_docker: 13 | name: build 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v4 18 | 19 | - name: Login to Docker Hub 20 | uses: docker/login-action@v3 21 | with: 22 | username: ${{ secrets.DOCKERHUB_USERNAME }} 23 | password: ${{ secrets.DOCKERHUB_TOKEN }} 24 | 25 | - name: Build and push manylinux_2_34_x86_64_cuda-12.8 26 | id: docker_build 27 | uses: docker/build-push-action@v5 28 | with: 29 | push: true 30 | file: ./docker/manylinux_2_34_x86_64_cuda_12.8/Dockerfile 31 | tags: sameli/manylinux_2_34_x86_64_cuda_12.8:latest 32 | 33 | - name: Image digest 34 | run: echo ${{ steps.docker_build.outputs.digest }} 35 | 36 | test_docker: 37 | needs: [build_docker] 38 | name: test 39 | runs-on: ubuntu-latest 40 | steps: 41 | - name: Install Snap 42 | run: | 43 | sudo apt update 44 | sudo apt install snapd 45 | 46 | - name: Install Docker 47 | run: | 48 | sudo snap install docker 49 | sudo groupadd -f docker 50 | sudo usermod -aG docker $USER 51 | newgrp docker 52 | 53 | - name: Pull Docker Image 54 | run: docker pull sameli/manylinux_2_34_x86_64_cuda_12.8 55 | 56 | - name: Run Docker Image 57 | run: docker run -t sameli/manylinux_2_34_x86_64_cuda_12.8 nvcc --version 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # === 2 | # Vim 3 | # === 4 | 5 | *.vim 6 | *.sw[op] 7 | -------------------------------------------------------------------------------- /AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Siavash Ameli 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2021, Siavash Ameli 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | manylinux-cuda 2 | ************** 3 | 4 | `manylinux `__ docker images featuring an installation of the **NVIDIA CUDA** compiler, runtime and development libraries, designed specifically for building Python wheels with a C++/CUDA backend. 5 | 6 | Download Images 7 | =============== 8 | 9 | Obtain the docker images from Docker Hub for the following CUDA versions: 10 | 11 | X86_64 Architecture 12 | ------------------- 13 | 14 | * **manylinux_2_34** on **X86_64** arch with CUDA **12.8** (`see on Dockerhub `__) |deploy-docker-manylinux_2_34_x86_64_cuda_12.8| 15 | 16 | :: 17 | 18 | docker pull sameli/manylinux_2_34_x86_64_cuda_12.8 19 | 20 | * **manylinux_2_28** on **X86_64** arch with CUDA **12.3** (`see on Dockerhub `__) |deploy-docker-manylinux_2_28_x86_64_cuda_12.3| 21 | 22 | :: 23 | 24 | docker pull sameli/manylinux_2_28_x86_64_cuda_12.3 25 | 26 | * **manylinux2014** on **X86_64** arch with CUDA **12.3** (`see on Dockerhub `__) |deploy-docker-manylinux2014_x86_64_cuda_12.3| 27 | 28 | :: 29 | 30 | docker pull sameli/manylinux2014_x86_64_cuda_12.3 31 | 32 | * **manylinux2014** on **X86_64** arch with CUDA **12.0** (`see on Dockerhub `__) |deploy-docker-manylinux2014_x86_64_cuda_12_0| 33 | 34 | :: 35 | 36 | docker pull sameli/manylinux2014_x86_64_cuda_12.0 37 | 38 | * **manylinux2014** on **X86_64** arch with CUDA **11.8** (`see on Dockerhub `__) |deploy-docker-manylinux2014_x86_64_cuda_11_8| 39 | 40 | :: 41 | 42 | docker pull sameli/manylinux2014_x86_64_cuda_11.8 43 | 44 | * **manylinux2014** on **X86_64** arch with CUDA **10.2** (`see on Dockerhub `__) |deploy-docker-manylinux2014_x86_64_cuda_10_2| 45 | 46 | :: 47 | 48 | docker pull sameli/manylinux2014_x86_64_cuda_10.2 49 | 50 | 51 | AARCH64 Architecture 52 | -------------------- 53 | 54 | * **manylinux_2_34** on **AARCH64** arch with CUDA **12.9** (`see on Dockerhub `__) |deploy-docker-manylinux_2_34_aarch64_cuda_12_9| 55 | 56 | :: 57 | 58 | docker pull sameli/manylinux_2_34_x86_64_cuda_12.9 59 | 60 | * **manylinux2014** on **AARCH64** arch with CUDA **12.9** (`see on Dockerhub `__) |deploy-docker-manylinux2014_aarch64_cuda_12_9| 61 | 62 | :: 63 | 64 | docker pull sameli/manylinux2014_x86_64_cuda_12.8 65 | 66 | Base of Images 67 | ============== 68 | 69 | The docker images were built based on the following images: 70 | 71 | * **manylinux_2_34** on **X86_64** architecture is based on: `quay.io/pypa/manylinux_2_34_x86_64 `__ 72 | * **manylinux_2_28** on **X86_64** architecture is based on: `quay.io/pypa/manylinux_2_28_x86_64 `__ 73 | * **manylinux_2_34** on **AARCH64** architecture is based on: `quay.io/pypa/manylinux_2_34_aarch64 `__ 74 | * **manylinux2014** on **X86_64** architecture is based on: `quay.io/pypa/manylinux2014_x86_64 `__ 75 | * **manylinux2014** on **AARCH64** architecture is based on: `quay.io/pypa/manylinux2014_aarch64 `__ 76 | 77 | What is Included 78 | ================ 79 | 80 | To maintain a minimal Docker image size, only the essential compilers and libraries from CUDA Toolkit are included. These include: 81 | 82 | * CUDA compiler: ``cuda-crt``, ``cuda-cuobjdump``, ``cuda-cuxxfilt``, ``cuda-nvcc``, ``cuda-nvprune``, ``cuda-nvvm``, ``cuda-cudart``, ``cuda-nvrtc``, ``cuda-opencl``, 83 | * CUDA libraries: ``libcublas``, ``libcufft``, ``libcufile``, ``libcurand``, ``libcusolver``, ``libcusparse``, ``libnpp``, ``libnvjitlink``, ``libnvjpeg`` 84 | * CUDA development libraries: ``cuda-cccl``, ``cuda-cudart-devel``, ``cuda-driver-devel``, ``cuda-nvrtc-devel``, ``cuda-opencl-devel``, ``cuda-profiler-api``, ``libcublas-devel``, ``libcufft-devel``, ``libcufile-devel``, ``libcurand-devel``, ``libcusolver-devel``, ``libcusparse-devel``, ``libnpp-devel``, ``libnvjitlink-devel``, ``libnvjpeg-devel`` 85 | 86 | If you need additional packages from CUDA toolkit to be included in the images, please feel free to create a `GitHub issue `__. 87 | 88 | .. _install-nvidia-driver: 89 | 90 | NVIDIA Driver 91 | ============= 92 | 93 | The Docker images do not include the NVIDIA driver to prevent incompatibility issues with the host system's native driver when used at runtime. 94 | 95 | For users who might need specific components of the NVIDIA driver, such as ``libcuda.so``, to compile their code, there are two options: 96 | 97 | 1. *Use the Host's Native Driver:* Add the ``--gpus all`` flag to your ``docker run`` command to enable the container to utilize the host’s GPU and driver (see `Use Host's GPU `_ for details). This is the recommended approach as it avoids compatibility issues between the container's and host's drivers. 98 | 99 | 2. *Install the Driver in the Container:* If necessary, the driver can be installed within the container using the following commands, based on your image's base distribution: 100 | 101 | * For ``manylinux_2`` images: 102 | 103 | :: 104 | 105 | dnf -y install epel-release 106 | dnf -y module install nvidia-driver:latest-dkms 107 | 108 | * For ``manylinux2014`` images: 109 | 110 | :: 111 | 112 | yum install nvidia-driver-latest-dkms 113 | 114 | Note, however, that this step should generally be avoided unless strictly required, as it may lead to compatibility issues between the driver versions in the container and on the host system. If possible, it is recommended to rely on the host system's driver installation when running containers that require GPU access. 115 | 116 | Environment Variables 117 | ===================== 118 | 119 | The following environment variables are defined: 120 | 121 | * ``PATH=/usr/local/cuda/bin:${PATH}`` 122 | * ``LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH}`` 123 | * ``CUDA_HOME=/usr/local/cuda`` 124 | * ``CUDA_ROOT=/usr/local/cuda`` 125 | * ``CUDA_PATH=/usr/local/cuda`` 126 | * ``CUDADIR=/usr/local/cuda`` 127 | 128 | Run Containers 129 | ============== 130 | 131 | Run containers in interactive mode by: 132 | 133 | :: 134 | 135 | docker run -it sameli/manylinux_2_34_x86_64_cuda_12.8 136 | 137 | Check CUDA Version 138 | ================== 139 | 140 | The ``nvcc`` executable is available on the ``PATH``. To check the CUDA version, execute: 141 | 142 | :: 143 | 144 | docker run -t sameli/manylinux_2_34_x86_64_cuda_12.8 nvcc --version 145 | 146 | The output of the above command is: 147 | 148 | :: 149 | 150 | Copyright (c) 2005-2022 NVIDIA Corporation 151 | Built on Mon_Oct_24_19:12:58_PDT_2022 152 | Cuda compilation tools, release 12.8, V12.8.76 153 | Build cuda_12.8.r12.8/compiler.31968024_0 154 | 155 | .. _use-hosts-gpu: 156 | 157 | Use Host's GPU 158 | ============== 159 | 160 | The primary purpose of these Docker images is to build code, such as Python wheels, using the *manylinux* standard. While this process does not require access to the host's GPU, you might want to use them at runtime on the host's GPU, particularly for testing purposes. 161 | 162 | To access host's GPU device from the container, install `NVIDIA Container Toolkit `__ as follows. 163 | 164 | 1. Add the package to the repository: 165 | 166 | :: 167 | 168 | distribution=$(. /etc/os-release;echo $ID$VERSION_ID) 169 | curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - 170 | curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list 171 | 172 | 2. Install `nvidia-contaner-toolkit` by: 173 | 174 | :: 175 | 176 | sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit 177 | 178 | 3. Restart docker to be able to use it: 179 | 180 | :: 181 | 182 | sudo systemctl restart docker 183 | 184 | To use host's GPU, add ``--gpus all`` to any of the docker commands given before, such as: 185 | 186 | :: 187 | 188 | docker run --gpus all -it sameli/manylinux_2_34_x86_64_cuda_12.8 189 | 190 | To check the host's NVIDIA driver version, CUDA runtime library version, and list of available GPU devices, run ``nvida-smi`` command, such as by: 191 | 192 | :: 193 | 194 | docker run --gpus all sameli/manylinux_2_34_x86_64_cuda_12.8 nvidia-smi 195 | 196 | 197 | Troubleshooting 198 | =============== 199 | 200 | No Space Left on Device 201 | ----------------------- 202 | 203 | When running the docker containers in GitHub action, you may encounter this error: 204 | 205 | :: 206 | 207 | no space left on device. 208 | 209 | To resolve this, try clearing the GitHub's runner cache before executing the docker container: 210 | 211 | :: 212 | 213 | - name: Clear Cache 214 | run: rm -rf /opt/hostedtoolcache 215 | 216 | Driver Conflict 217 | --------------- 218 | 219 | If you run the container with ``--gpus all`` to access the `host's GPU `_, conflicts may arise if you also `install an NVIDIA driver `_ within the container. This typically does not cause problems until you attempt to use the driver, such as by commands like ``nvidia-smi`` inside the container, which can lead to errors due to driver conflicts. To resolve this, ensure you use only one driver source. You can either rely solely on the host's driver by not installing a separate driver in the container, or refrain from using the host's GPU if you intend to install a driver in the container. 220 | 221 | Other CUDA Versions 222 | =================== 223 | 224 | To request a docker image for a specific CUDA version or architecture, feel free to create a `GitHub issue `__. 225 | 226 | License 227 | ======= 228 | 229 | |license| 230 | 231 | .. |license| image:: https://img.shields.io/github/license/ameli/manylinux-cuda 232 | :target: https://opensource.org/licenses/BSD-3-Clause 233 | 234 | .. |deploy-docker-manylinux2014_x86_64_cuda_10_2| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml?label=build%20docker 235 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux2014_x86_64_cuda_10.2.yml 236 | .. |deploy-docker-manylinux2014_x86_64_cuda_11_7| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux2014_x86_64_cuda_11.7.yml?label=build%20docker 237 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.7.yml 238 | .. |deploy-docker-manylinux2014_x86_64_cuda_11_8| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml?label=build%20docker 239 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux2014_x86_64_cuda_11.8.yml 240 | .. |deploy-docker-manylinux2014_x86_64_cuda_12_0| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml?label=build%20docker 241 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.0.yml 242 | .. |deploy-docker-manylinux2014_x86_64_cuda_12.3| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml?label=build%20docker 243 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux2014_x86_64_cuda_12.3.yml 244 | .. |deploy-docker-manylinux_2_28_x86_64_cuda_12.3| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml?label=build%20docker 245 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux_2_28_x86_64_cuda_12.3.yml 246 | .. |deploy-docker-manylinux_2_34_x86_64_cuda_12.8| image:: https://img.shields.io/github/actions/workflow/status/ameli/manylinux-cuda/deploy-docker-manylinux_2_34_x86_64_cuda_12.8.yml?label=build%20docker 247 | :target: https://github.com/ameli/manylinux-cuda/actions/workflows/deploy-docker-manylinux_2_34_x86_64_cuda_12.8.yml 248 | .. |deploy-docker-manylinux2014_aarch64_cuda_12_9| image:: https://img.shields.io/cirrus/github/ameli/manylinux-cuda/main?label=build%20docker 249 | :target: https://cirrus-ci.com/github/ameli/manylinux-cuda 250 | .. |deploy-docker-manylinux_2_34_aarch64_cuda_12_9| image:: https://img.shields.io/cirrus/github/ameli/manylinux-cuda/main?label=build%20docker 251 | :target: https://cirrus-ci.com/github/ameli/manylinux-cuda 252 | 253 | .. |docker-pull-manylinux2014_x86_64_cuda_10_2| image:: https://img.shields.io/docker/pulls/sameli/manylinux2014_x86_64_cuda_10.2?color=green&label=downloads 254 | :target: https://hub.docker.com/r/sameli/manylinux2014_x86_64_cuda_10.2 255 | .. |docker-pull-manylinux2014_x86_64_cuda_11_7| image:: https://img.shields.io/docker/pulls/sameli/manylinux2014_x86_64_cuda_11.7?color=green&label=downloads 256 | :target: https://hub.docker.com/r/sameli/manylinux2014_x86_64_cuda_11.7 257 | .. |docker-pull-manylinux2014_x86_64_cuda_11_8| image:: https://img.shields.io/docker/pulls/sameli/manylinux2014_x86_64_cuda_11.8?color=green&label=downloads 258 | :target: https://hub.docker.com/r/sameli/manylinux2014_x86_64_cuda_11.8 259 | .. |docker-pull-manylinux2014_x86_64_cuda_12_0| image:: https://img.shields.io/docker/pulls/sameli/manylinux2014_x86_64_cuda_12.0?color=green&label=downloads 260 | :target: https://hub.docker.com/r/sameli/manylinux2014_x86_64_cuda_12.0 261 | .. |docker-pull-manylinux2014_x86_64_cuda_12.3| image:: https://img.shields.io/docker/pulls/sameli/manylinux2014_x86_64_cuda_12.3?color=green&label=downloads 262 | :target: https://hub.docker.com/r/sameli/manylinux2014_x86_64_cuda_12.3 263 | .. |docker-pull-manylinux_2_28_x86_64_cuda_12.3| image:: https://img.shields.io/docker/pulls/sameli/manylinux_2_28_x86_64_cuda_12.3?color=green&label=downloads 264 | :target: https://hub.docker.com/r/sameli/manylinux_2_28_x86_64_cuda_12.3 265 | .. |docker-pull-manylinux_2_34_x86_64_cuda_12.8| image:: https://img.shields.io/docker/pulls/sameli/manylinux_2_34_x86_64_cuda_12.8?color=green&label=downloads 266 | :target: https://hub.docker.com/r/sameli/manylinux_2_34_x86_64_cuda_12.8 267 | .. |docker-pull-manylinux2014_aarch64_cuda_12_9| image:: https://img.shields.io/docker/pulls/sameli/manylinux2014_aarch64_cuda_12.9?color=green&label=downloads 268 | :target: https://hub.docker.com/r/sameli/manylinux2014_aarch64_cuda_12.9 269 | .. |docker-pull-manylinux_2_34_aarch64_cuda_12_9| image:: https://img.shields.io/docker/pulls/sameli/manylinux_2_34_aarch64_cuda_12.9?color=green&label=downloads 270 | :target: https://hub.docker.com/r/sameli/manylinux_2_34_aarch64_cuda_12.9 271 | -------------------------------------------------------------------------------- /docker-compose-aarch64.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | manylinux2014_aarch64_cuda_12.9: 4 | build: ./docker/manylinux2014_aarch64_cuda_12.9 5 | image: sameli/manylinux2014_aarch64_cuda_12.9 6 | manylinux_2_34_aarch64_cuda_12.9: 7 | build: ./docker/manylinux_2_34_aarch64_cuda_12.9 8 | image: sameli/manylinux_2_34_aarch64_cuda_12.9 9 | -------------------------------------------------------------------------------- /docker-compose-x86_64.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | manylinux2014_x86_64_cuda_10.2: 4 | build: ./docker/manylinux2014_x86_64_cuda_10.2 5 | image: sameli/manylinux2014_x86_64_cuda_10.2 6 | 7 | manylinux2014_x86_64_cuda_11.8: 8 | build: ./docker/manylinux2014_x86_64_cuda_11.8 9 | image: sameli/manylinux2014_x86_64_cuda_11.8 10 | 11 | manylinux2014_x86_64_cuda_12.0: 12 | build: ./docker/manylinux2014_x86_64_cuda_12.0 13 | image: sameli/manylinux2014_x86_64_cuda_12.0 14 | 15 | manylinux2014_x86_64_cuda_12.3: 16 | build: ./docker/manylinux2014_x86_64_cuda_12.3 17 | image: sameli/manylinux2014_x86_64_cuda_12.3 18 | 19 | manylinux_2_28_x86_64_cuda_12.3: 20 | build: ./docker/manylinux_2_28_x86_64_cuda_12.3 21 | image: sameli/manylinux_2_28_x86_64_cuda_12.3 22 | 23 | manylinux_2_34_x86_64_cuda_12.8: 24 | build: ./docker/manylinux_2_34_x86_64_cuda_12.8 25 | image: sameli/manylinux_2_34_x86_64_cuda_12.8 26 | -------------------------------------------------------------------------------- /docker/manylinux2014_aarch64_cuda_12.9/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux2014_aarch64_cuda_12.9 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux2014_aarch64_cuda_12.9 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux2014_aarch64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux2014_aarch64 with cuda 12.9" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="12-9" 28 | ARG ARCH="aarch64" 29 | 30 | RUN yum install -y yum-utils 31 | RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/sbsa/cuda-rhel9.repo 32 | RUN yum -y install cuda-compiler-${VER}.${ARCH} \ 33 | cuda-libraries-${VER}.${ARCH} \ 34 | cuda-libraries-devel-${VER}.${ARCH} 35 | RUN yum clean all 36 | RUN rm -rf /var/cache/yum/* 37 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 38 | 39 | # ------------------------- 40 | # Set environment variables 41 | # ------------------------- 42 | 43 | ENV PATH="/usr/local/cuda/bin:${PATH}" 44 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 45 | ENV CUDA_HOME=/usr/local/cuda 46 | ENV CUDA_ROOT=/usr/local/cuda 47 | ENV CUDA_PATH=/usr/local/cuda 48 | ENV CUDADIR=/usr/local/cuda 49 | 50 | # -------- 51 | # Commands 52 | # -------- 53 | 54 | CMD ["/bin/bash"] 55 | -------------------------------------------------------------------------------- /docker/manylinux2014_x86_64_cuda_10.2/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux2014_x86_64_cuda_10.2 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux2014_x86_64_cuda_10.2 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux2014_x86_64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux2014_x86_64 with cuda 10.2" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="10-2" 28 | ARG ARCH="x86_64" 29 | 30 | RUN yum install -y yum-utils 31 | RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo 32 | RUN yum -y install cuda-compiler-${VER}.${ARCH} \ 33 | cuda-libraries-${VER}.${ARCH} \ 34 | cuda-libraries-dev-${VER}.${ARCH} 35 | RUN yum clean all 36 | RUN rm -rf /var/cache/yum/* 37 | RUN echo "/usr/local/cuda-10.2/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 38 | 39 | # ------------------------- 40 | # Set environment variables 41 | # ------------------------- 42 | 43 | ENV PATH="/usr/local/cuda-10.2/bin:${PATH}" 44 | ENV LD_LIBRARY_PATH="/usr/local/cuda-10.2/lib64:${LD_LIBRARY_PATH}" 45 | ENV CUDA_HOME=/usr/local/cuda-10.2 46 | ENV CUDA_ROOT=/usr/local/cuda-10.2 47 | ENV CUDA_PATH=/usr/local/cuda-10.2 48 | ENV CUDADIR=/usr/local/cuda-10.2 49 | 50 | # ------------------ 51 | # Set Compatible GCC 52 | # ------------------ 53 | 54 | # Cuda 10 is not compatible with gcc version higher than 8. 55 | RUN yum -y install centos-release-scl 56 | RUN sed -i 's|^mirrorlist=.*|baseurl=http://vault.centos.org/centos/7/sclo/x86_64/sclo/|' /etc/yum.repos.d/CentOS-SCLo-scl.repo && yum clean all 57 | RUN yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ 58 | # RUN ln -s /opt/rh/devtoolset-8/root/bin/gcc /usr/local/cuda/bin/gcc 59 | # RUN ln -s /opt/rh/devtoolset-8/root/bin/g++ /usr/local/cuda/bin/g++ 60 | # RUN scl enable devtoolset-8 -- bash 61 | ENV PATH=/opt/rh/devtoolset-8/root/bin/:$PATH 62 | 63 | # -------- 64 | # Commands 65 | # -------- 66 | 67 | CMD ["/bin/bash"] 68 | -------------------------------------------------------------------------------- /docker/manylinux2014_x86_64_cuda_11.8/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux2014_x86_64_cuda_11.8 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux2014_x86_64_cuda_11.8 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux2014_x86_64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux2014_x86_64 with cuda 11.8" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="11-8" 28 | ARG ARCH="x86_64" 29 | 30 | RUN yum install -y yum-utils 31 | RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo 32 | RUN yum -y install cuda-compiler-${VER}.${ARCH} \ 33 | cuda-libraries-${VER}.${ARCH} \ 34 | cuda-libraries-devel-${VER}.${ARCH} 35 | RUN yum clean all 36 | RUN rm -rf /var/cache/yum/* 37 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 38 | 39 | # ------------------------- 40 | # Set environment variables 41 | # ------------------------- 42 | 43 | ENV PATH="/usr/local/cuda/bin:${PATH}" 44 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 45 | ENV CUDA_HOME=/usr/local/cuda 46 | ENV CUDA_ROOT=/usr/local/cuda 47 | ENV CUDA_PATH=/usr/local/cuda 48 | ENV CUDADIR=/usr/local/cuda 49 | 50 | # -------- 51 | # Commands 52 | # -------- 53 | 54 | CMD ["/bin/bash"] 55 | -------------------------------------------------------------------------------- /docker/manylinux2014_x86_64_cuda_12.0/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux2014_x86_64_cuda_12.0 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux2014_x86_64_cuda_12.0 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux2014_x86_64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux2014_x86_64 with cuda 12.0" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="12-0" 28 | ARG ARCH="x86_64" 29 | 30 | RUN yum install -y yum-utils 31 | RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo 32 | RUN yum -y install cuda-compiler-${VER}.${ARCH} \ 33 | cuda-libraries-${VER}.${ARCH} \ 34 | cuda-libraries-devel-${VER}.${ARCH} 35 | RUN yum clean all 36 | RUN rm -rf /var/cache/yum/* 37 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 38 | 39 | # ------------------------- 40 | # Set environment variables 41 | # ------------------------- 42 | 43 | ENV PATH="/usr/local/cuda/bin:${PATH}" 44 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 45 | ENV CUDA_HOME=/usr/local/cuda 46 | ENV CUDA_ROOT=/usr/local/cuda 47 | ENV CUDA_PATH=/usr/local/cuda 48 | ENV CUDADIR=/usr/local/cuda 49 | 50 | # -------- 51 | # Commands 52 | # -------- 53 | 54 | CMD ["/bin/bash"] 55 | -------------------------------------------------------------------------------- /docker/manylinux2014_x86_64_cuda_12.3/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux2014_x86_64_cuda_12.3 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux2014_x86_64_cuda_12.3 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux2014_x86_64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux2014_x86_64 with cuda 12.3" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="12-3" 28 | ARG ARCH="x86_64" 29 | 30 | RUN yum install -y yum-utils 31 | RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo 32 | RUN yum -y install cuda-compiler-${VER}.${ARCH} \ 33 | cuda-libraries-${VER}.${ARCH} \ 34 | cuda-libraries-devel-${VER}.${ARCH} 35 | RUN yum clean all 36 | RUN rm -rf /var/cache/yum/* 37 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 38 | 39 | # ------------------------- 40 | # Set environment variables 41 | # ------------------------- 42 | 43 | ENV PATH="/usr/local/cuda/bin:${PATH}" 44 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 45 | ENV CUDA_HOME=/usr/local/cuda 46 | ENV CUDA_ROOT=/usr/local/cuda 47 | ENV CUDA_PATH=/usr/local/cuda 48 | ENV CUDADIR=/usr/local/cuda 49 | 50 | # -------- 51 | # Commands 52 | # -------- 53 | 54 | CMD ["/bin/bash"] 55 | -------------------------------------------------------------------------------- /docker/manylinux_2_28_x86_64_cuda_12.3/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux_2_28_x86_64_cuda_12.3 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux_2_28_x86_64_cuda_12.3 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux_2_28_x86_64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux_2_28_x86_64 with cuda 12.3" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="12-3" 28 | ARG ARCH="x86_64" 29 | 30 | RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo 31 | RUN dnf -y install cuda-compiler-${VER}.${ARCH} \ 32 | cuda-libraries-${VER}.${ARCH} \ 33 | cuda-libraries-devel-${VER}.${ARCH} 34 | RUN dnf clean all 35 | RUN rm -rf /var/cache/dnf/* 36 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 37 | 38 | # ------------------------- 39 | # Set environment variables 40 | # ------------------------- 41 | 42 | ENV PATH="/usr/local/cuda/bin:${PATH}" 43 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 44 | ENV CUDA_HOME=/usr/local/cuda 45 | ENV CUDA_ROOT=/usr/local/cuda 46 | ENV CUDA_PATH=/usr/local/cuda 47 | ENV CUDADIR=/usr/local/cuda 48 | 49 | # -------- 50 | # Commands 51 | # -------- 52 | 53 | CMD ["/bin/bash"] 54 | -------------------------------------------------------------------------------- /docker/manylinux_2_34_aarch64_cuda_12.9/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux_2_34_aarch64_cuda_12.9 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux_2_34_aarch64_cuda_12.9 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux_2_34_aarch64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux_2_34_aarch64 with cuda 12.9" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="12-9" 28 | ARG ARCH="aarch64" 29 | 30 | RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo 31 | RUN dnf -y install cuda-compiler-${VER}.${ARCH} \ 32 | cuda-libraries-${VER}.${ARCH} \ 33 | cuda-libraries-devel-${VER}.${ARCH} 34 | RUN dnf clean all 35 | RUN rm -rf /var/cache/dnf/* 36 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 37 | 38 | # ------------------------- 39 | # Set environment variables 40 | # ------------------------- 41 | 42 | ENV PATH="/usr/local/cuda/bin:${PATH}" 43 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 44 | ENV CUDA_HOME=/usr/local/cuda 45 | ENV CUDA_ROOT=/usr/local/cuda 46 | ENV CUDA_PATH=/usr/local/cuda 47 | ENV CUDADIR=/usr/local/cuda 48 | 49 | # -------- 50 | # Commands 51 | # -------- 52 | 53 | CMD ["/bin/bash"] 54 | -------------------------------------------------------------------------------- /docker/manylinux_2_34_x86_64_cuda_12.8/Dockerfile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | 5 | # ----------------------------------------------------------------------------- 6 | # How to build 7 | # $ docker build -t sameli/manylinux_2_34_x86_64_cuda_12.8 -f . 8 | # 9 | # How to run: 10 | # $ docker run -it -v/host_dir:/image_dir --entrypoint /bin/bash \ 11 | # manylinux_2_34_x86_64_cuda_12.8 12 | # ----------------------------------------------------------------------------- 13 | 14 | # ----------------- 15 | # Choose base image 16 | # ----------------- 17 | 18 | FROM quay.io/pypa/manylinux_2_34_x86_64 19 | 20 | MAINTAINER Siavash Ameli 21 | LABEL Description="manylinux_2_34_x86_64 with cuda 12.8" 22 | 23 | # ------------ 24 | # Install cuda 25 | # ------------ 26 | 27 | ARG VER="12-8" 28 | ARG ARCH="x86_64" 29 | 30 | RUN dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo 31 | RUN dnf -y install cuda-compiler-${VER}.${ARCH} \ 32 | cuda-libraries-${VER}.${ARCH} \ 33 | cuda-libraries-devel-${VER}.${ARCH} 34 | RUN dnf clean all 35 | RUN rm -rf /var/cache/dnf/* 36 | RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf 37 | 38 | # ------------------------- 39 | # Set environment variables 40 | # ------------------------- 41 | 42 | ENV PATH="/usr/local/cuda/bin:${PATH}" 43 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" 44 | ENV CUDA_HOME=/usr/local/cuda 45 | ENV CUDA_ROOT=/usr/local/cuda 46 | ENV CUDA_PATH=/usr/local/cuda 47 | ENV CUDADIR=/usr/local/cuda 48 | 49 | # -------- 50 | # Commands 51 | # -------- 52 | 53 | CMD ["/bin/bash"] 54 | -------------------------------------------------------------------------------- /tools/ci/cirrus_deploy_docker_manylinux2014_aarch64_cuda_12.9.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | # 5 | # This program is free software: you can redistribute it and/or modify it 6 | # under the terms of the license found in the LICENSE.txt file in the root 7 | # directory of this source tree. 8 | 9 | 10 | # ==================================== 11 | # manylinux2014 aarch64 cuda 12.9 cibw 12 | # ==================================== 13 | 14 | manylinux2014_aarch64_cuda_12_9_cibw: &MANYLINUX2014_AARCH64_CUDA_12_9_CIBW 15 | install_cibuildwheel_script: 16 | - python -m pip install cibuildwheel 17 | cibuildwheel_script: 18 | - cibuildwheel 19 | conda_linux_aarch64_wheels_artifacts: 20 | path: "wheelhouse/*.whl" 21 | 22 | 23 | # ============================================ 24 | # build docker manylinux2014 aarch64 cuda 12-9 25 | # ============================================ 26 | 27 | build_docker_manylinux2014_aarch64_cuda_12_9_task: 28 | use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' 29 | compute_engine_instance: 30 | image_project: cirrus-images 31 | image: family/docker-builder-arm64 32 | architecture: arm64 33 | platform: linux 34 | cpu: 1 35 | memory: 8G 36 | env: 37 | DOCKERHUB_TOKEN: ENCRYPTED[!05c76b305df7bb81c59faa33981e2cf4d08c4aa6f1c0313645815c5729f42b6d9db7f2829260ca8cb1e92637151670ad!] 38 | 39 | build_script: | 40 | 41 | # Install docker 42 | source ./tools/scripts/docker_utils.sh 43 | install_docker 44 | 45 | # Build source 46 | docker build -t sameli/manylinux2014_aarch64_cuda_12.9 -f ./docker/manylinux2014_aarch64_cuda_12.9/Dockerfile . 47 | 48 | docker images 49 | 50 | # Upload image to dockerhub 51 | DOCKERHUB_USERNAME="sameli" 52 | docker login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_TOKEN} 53 | 54 | # Upload to dockerhub 55 | docker push sameli/manylinux2014_aarch64_cuda_12.9 56 | 57 | 58 | # =========================================== 59 | # test docker manylinux2014 aarch64 cuda 12-9 60 | # =========================================== 61 | 62 | test_docker_manylinux2014_aarch64_cuda_12_9_task: 63 | use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' 64 | compute_engine_instance: 65 | image_project: cirrus-images 66 | image: family/docker-builder-arm64 67 | architecture: arm64 68 | platform: linux 69 | cpu: 1 70 | memory: 8G 71 | depends_on: 72 | - build_docker_manylinux2014_aarch64_cuda_12_9 73 | 74 | test_script: | 75 | 76 | # Install docker 77 | source ./tools/scripts/docker_utils.sh 78 | install_docker 79 | 80 | # Test dockerhub image 81 | docker run -t sameli/manylinux2014_aarch64_cuda_12.9 nvcc --version 82 | -------------------------------------------------------------------------------- /tools/ci/cirrus_deploy_docker_manylinux_2_34_aarch64_cuda_12.9.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | # 5 | # This program is free software: you can redistribute it and/or modify it 6 | # under the terms of the license found in the LICENSE.txt file in the root 7 | # directory of this source tree. 8 | 9 | 10 | # ===================================== 11 | # manylinux 2_34 aarch64 cuda 12.9 cibw 12 | # ===================================== 13 | 14 | manylinux_2_34_aarch64_cuda_12_9_cibw: &MANYLINUX_2_34_AARCH64_CUDA_12_9_CIBW 15 | install_cibuildwheel_script: 16 | - python -m pip install cibuildwheel 17 | cibuildwheel_script: 18 | - cibuildwheel 19 | conda_linux_aarch64_wheels_artifacts: 20 | path: "wheelhouse/*.whl" 21 | 22 | 23 | # ============================================= 24 | # build docker manylinux 2_34 aarch64 cuda 12-9 25 | # ============================================= 26 | 27 | build_docker_manylinux_2_34_aarch64_cuda_12_9_task: 28 | use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' 29 | compute_engine_instance: 30 | image_project: cirrus-images 31 | image: family/docker-builder-arm64 32 | architecture: arm64 33 | platform: linux 34 | cpu: 1 35 | memory: 8G 36 | env: 37 | DOCKERHUB_TOKEN: ENCRYPTED[!05c76b305df7bb81c59faa33981e2cf4d08c4aa6f1c0313645815c5729f42b6d9db7f2829260ca8cb1e92637151670ad!] 38 | 39 | build_script: | 40 | 41 | # Install docker 42 | source ./tools/scripts/docker_utils.sh 43 | install_docker 44 | 45 | # Build source 46 | docker build -t sameli/manylinux_2_34_aarch64_cuda_12.9 -f ./docker/manylinux_2_34_aarch64_cuda_12.9/Dockerfile . 47 | 48 | docker images 49 | 50 | # Upload image to dockerhub 51 | DOCKERHUB_USERNAME="sameli" 52 | docker login --username ${DOCKERHUB_USERNAME} --password ${DOCKERHUB_TOKEN} 53 | 54 | # Upload to dockerhub 55 | docker push sameli/manylinux_2_34_aarch64_cuda_12.9 56 | 57 | 58 | # ============================================ 59 | # test docker manylinux 2_34 aarch64 cuda 12-9 60 | # ============================================ 61 | 62 | test_docker_manylinux_2_34_aarch64_cuda_12_9_task: 63 | use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' 64 | compute_engine_instance: 65 | image_project: cirrus-images 66 | image: family/docker-builder-arm64 67 | architecture: arm64 68 | platform: linux 69 | cpu: 1 70 | memory: 8G 71 | depends_on: 72 | - build_docker_manylinux_2_34_aarch64_cuda_12_9 73 | 74 | test_script: | 75 | 76 | # Install docker 77 | source ./tools/scripts/docker_utils.sh 78 | install_docker 79 | 80 | # Test dockerhub image 81 | docker run -t sameli/manylinux_2_34_aarch64_cuda_12.9 nvcc --version 82 | -------------------------------------------------------------------------------- /tools/scripts/docker_utils.sh: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli 2 | # SPDX-License-Identifier: BSD-3-Clause 3 | # SPDX-FileType: SOURCE 4 | # 5 | # This program is free software: you can redistribute it and/or modify it 6 | # under the terms of the license found in the LICENSE.txt file in the root 7 | # directory of this source tree. 8 | 9 | 10 | # ============== 11 | # install docker 12 | # ============== 13 | 14 | install_docker() { 15 | 16 | # Non-interactive mode 17 | # export DEBIAN_FRONTEND=noninteractive 18 | 19 | # Add Docker's official GPG key: 20 | sudo apt-get update 21 | sudo apt-get install ca-certificates curl gnupg -y 22 | sudo install -m 0755 -d /etc/apt/keyrings 23 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 24 | sudo chmod a+r /etc/apt/keyrings/docker.gpg 25 | 26 | # Add the repository to Apt sources: 27 | echo \ 28 | "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ 29 | $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ 30 | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 31 | sudo apt-get update 32 | 33 | # Install latest version of docker 34 | sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y 35 | 36 | # Check docker with hello world example 37 | sudo service docker start 38 | sudo docker run hello-world 39 | 40 | # Configure to use docker without sudo 41 | getent group docker || sudo groupadd docker 42 | 43 | # Check docker works without sudo 44 | docker run hello-world 45 | } 46 | --------------------------------------------------------------------------------