-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] added manylinux support (#185)
- [x] fix the build error for cuda 11.8 - [ ] add cuda 11.8 support for manylinux /usr/local/cuda/bin/../targets/x86_64-linux/include/crt/host_config.h:132:2: error: #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. 132 | #error -- unsupported GNU version! gcc versions later than 11 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
- Loading branch information
Showing
15 changed files
with
413 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish manylinux docker image | ||
on: | ||
workflow_dispatch: | ||
env: | ||
# Tells where to store caches. | ||
CI_CACHE_DIR: ${{ github.workspace }}/../../ci_cache | ||
|
||
jobs: | ||
publish_base: | ||
runs-on: [self-hosted, linux, release] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
- name: Build base for cuda 12.1 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./docker | ||
file: ./docker/Dockerfile.manylinux | ||
push: true | ||
cache-from: type=local,src=$CI_CACHE_DIR/.buildx-cache | ||
cache-to: type=local,dest=$CI_CACHE_DIR/.buildx-cache | ||
build-args: | | ||
CUDA_VERSION=12.1 | ||
tags: | | ||
vectorchai/scalellm_manylinux:cuda12.1 | ||
# - name: Build base for cuda 11.8 | ||
# uses: docker/build-push-action@v5 | ||
# with: | ||
# context: ./docker | ||
# file: ./docker/Dockerfile.manylinux | ||
# push: true | ||
# cache-from: type=local,src=$CI_CACHE_DIR/.buildx-cache | ||
# cache-to: type=local,dest=$CI_CACHE_DIR/.buildx-cache | ||
# build-args: | | ||
# CUDA_VERSION=11.8 | ||
# tags: | | ||
# vectorchai/scalellm_manylinux:cuda11.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM quay.io/pypa/manylinux_2_28_x86_64 as base | ||
|
||
LABEL maintainer="mi@vectorch.com" | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
# Install common dependencies | ||
COPY ./common/install_base.sh install_base.sh | ||
RUN bash ./install_base.sh && rm install_base.sh | ||
|
||
# Install user | ||
COPY ./common/install_user.sh install_user.sh | ||
RUN bash ./install_user.sh && rm install_user.sh | ||
|
||
# Install cuda, cudnn and nccl | ||
ARG CUDA_VERSION=12.1 | ||
COPY ./common/install_cuda.sh install_cuda.sh | ||
RUN bash ./install_cuda.sh ${CUDA_VERSION} && rm install_cuda.sh | ||
ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:$PATH | ||
|
||
# ARG CMAKE_VERSION=3.18.5 | ||
# COPY ./common/install_cmake.sh install_cmake.sh | ||
# RUN if [ -n "${CMAKE_VERSION}" ]; then bash ./install_cmake.sh; fi | ||
# RUN rm install_cmake.sh | ||
|
||
ARG NINJA_VERSION=1.11.1 | ||
COPY ./common/install_ninja.sh install_ninja.sh | ||
RUN if [ -n "${NINJA_VERSION}" ]; then bash ./install_ninja.sh; fi | ||
RUN rm install_ninja.sh | ||
|
||
ARG CCACHE_VERSION=4.8.3 | ||
COPY ./common/install_ccache.sh install_ccache.sh | ||
RUN if [ -n "${CCACHE_VERSION}" ]; then bash ./install_ccache.sh; fi | ||
RUN rm install_ccache.sh | ||
|
||
# install rust | ||
ENV RUSTUP_HOME=/usr/local/rustup | ||
ENV CARGO_HOME=/usr/local/cargo | ||
ENV PATH=/usr/local/cargo/bin:$PATH | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
# give everyone permission to use rust | ||
RUN chmod -R a+w ${RUSTUP_HOME} ${CARGO_HOME} | ||
RUN rustup --version; cargo --version; rustc --version | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
[ -n "$CCACHE_VERSION" ] | ||
|
||
ARCH=$(uname -m) | ||
url=https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}-linux-${ARCH}.tar.xz | ||
|
||
pushd /tmp | ||
curl -L "$url" | xz -d | tar -x | ||
cp ./ccache-${CCACHE_VERSION}-linux-x86_64/ccache /usr/bin/ccache | ||
popd | ||
|
||
# set max cache size to 5GiB | ||
/usr/bin/ccache -M 5Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.