Skip to content

Commit

Permalink
Add docker image for cu121 & enable nightly docker image build (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzh119 authored May 19, 2023
1 parent 27e2d68 commit cce8456
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- cu111
- cu113
- cu116
- cu117
- cu118
- cu121
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
55 changes: 55 additions & 0 deletions docker/Dockerfile.package-cu121
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Docker image: tlcpack/package-cu121

FROM pytorch/manylinux-cuda121

# install core
COPY install/centos_install_core.sh /install/centos_install_core.sh
RUN bash /install/centos_install_core.sh

# install cmake
COPY install/centos_install_cmake.sh /install/centos_install_cmake.sh
RUN bash /install/centos_install_cmake.sh

# build llvm
COPY install/centos_build_llvm.sh /install/centos_build_llvm.sh
RUN bash /install/centos_build_llvm.sh 10.0

# upgrade patchelf due to the bug in patchelf 0.10
# see details at https://stackoverflow.com/questions/61007071/auditwheel-repair-not-working-as-expected
COPY install/centos_install_patchelf.sh /install/centos_install_patchelf.sh
RUN bash /install/centos_install_patchelf.sh

# Install Arm Ethos-N NPU driver stack
COPY install/centos_install_arm_ethosn_driver_stack.sh /install/centos_install_arm_ethosn_driver_stack.sh
RUN bash /install/centos_install_arm_ethosn_driver_stack.sh

# Install Compute Library for Arm(r) Architecture (ACL)
COPY install/centos_install_arm_compute_library.sh /install/centos_install_arm_compute_library.sh
RUN bash /install/centos_install_arm_compute_library.sh

# Install Conda
COPY install/centos_install_conda.sh /install/centos_install_conda.sh
RUN bash /install/centos_install_conda.sh
ENV PATH=/opt/conda/bin:${PATH}

# Install Python
RUN conda create -n py37 python=3.7 -y
RUN conda create -n py38 python=3.8 -y
RUN conda create -n py39 python=3.9 -y
RUN conda create -n py310 python=3.10 -y
COPY install/centos_install_python_package.sh /install/centos_install_python_package.sh
RUN bash /install/centos_install_python_package.sh

COPY install/centos_install_auditwheel.sh /install/centos_install_auditwheel.sh
RUN bash /install/centos_install_auditwheel.sh

# Set default CUDA
RUN rm /usr/local/cuda; ln -s /usr/local/cuda-12.1 /usr/local/cuda

# Environment variables
ENV PATH=/usr/local/cuda/bin:${PATH}
ENV CPLUS_INCLUDE_PATH=/usr/local/cuda/include:${CPLUS_INCLUDE_PATH}
ENV C_INCLUDE_PATH=/usr/local/cuda/include:${C_INCLUDE_PATH}
ENV LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/compact:${LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/compact:${LD_LIBRARY_PATH}
ENV AUDITWHEEL_PLAT=manylinux2014_x86_64
6 changes: 3 additions & 3 deletions wheel/build_wheel_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source /multibuild/manylinux_utils.sh
function usage() {
echo "Usage: $0 [--cuda CUDA]"
echo
echo -e "--cuda {none 10.2 11.1 11.3 11.6}"
echo -e "--cuda {none 10.2 11.1 11.3 11.6 11.7 11.8 12.1}"
echo -e "\tSpecify the CUDA version in the TVM (default: none)."
}

Expand Down Expand Up @@ -39,7 +39,7 @@ function audit_tlcpack_wheel() {
TVM_PYTHON_DIR="/workspace/tvm/python"
PYTHON_VERSIONS_CPU=("3.7" "3.8" "3.9" "3.10" "3.11")
PYTHON_VERSIONS_GPU=("3.7" "3.8" "3.9" "3.10")
CUDA_OPTIONS=("none" "10.2" "11.1" "11.3" "11.6")
CUDA_OPTIONS=("none" "10.2" "11.1" "11.3" "11.6" "11.7" "11.8" "12.1")
CUDA="none"

while [[ $# -gt 0 ]]; do
Expand All @@ -66,7 +66,7 @@ done
if ! in_array "${CUDA}" "${CUDA_OPTIONS[*]}" ; then
echo "Invalid CUDA option: ${CUDA}"
echo
echo 'CUDA can only be {"none", "10.2", "11.1", "11.3", "11.6"}'
echo 'CUDA can only be {"none", "10.2", "11.1", "11.3", "11.6" "11.7" "11.8" "12.1"}'
exit -1
fi

Expand Down

0 comments on commit cce8456

Please sign in to comment.