Skip to content

Commit 750082f

Browse files
authored
chore: build manylinux2_28 builder image (#435)
1 parent 3f772c7 commit 750082f

File tree

5 files changed

+100
-61
lines changed

5 files changed

+100
-61
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish manylinux2_28 image
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
push:
6+
description: 'Push to Docker Hub'
7+
required: false
8+
default: 'true'
9+
10+
# Schedule the workflow to run at 9:00 (UTC) every month.
11+
schedule:
12+
# Minute[0,59] Hour[0,23] Day of month[1,31] Month[1,12] Day of week[0,6] (Sunday=0)
13+
- cron: '0 9 1 * *'
14+
15+
env:
16+
# Tells where to store caches.
17+
CI_CACHE_DIR: ${{ github.workspace }}/../../ci_cache
18+
19+
jobs:
20+
publish_manylinux_2_28_image:
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
cuda: ["12.6", "12.8"]
25+
runs-on: [self-hosted, linux, build]
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v3
32+
with:
33+
cache-image: false
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v3
37+
with:
38+
cache-binary: false
39+
40+
- name: Login to Docker Hub
41+
uses: docker/login-action@v3
42+
with:
43+
username: ${{ secrets.DOCKER_HUB_USER }}
44+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
45+
46+
- name: Create cache directory
47+
run: mkdir -p $CI_CACHE_DIR/.buildx-cache
48+
49+
- name: Build base for cuda ${{ matrix.cuda }}
50+
uses: docker/build-push-action@v5
51+
with:
52+
context: ./docker
53+
file: ./docker/Dockerfile.manylinux2_28
54+
push: ${{ inputs.push || 'true' }}
55+
cache-from: type=local,src=$CI_CACHE_DIR/.buildx-cache
56+
cache-to: type=local,dest=$CI_CACHE_DIR/.buildx-cache
57+
build-args: |
58+
CUDA_VERSION=${{ matrix.cuda }}
59+
tags: |
60+
vectorchai/scalellm_manylinux2_28:cuda${{ matrix.cuda }}

.github/workflows/publish_manylinux_image.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ on:
77
required: false
88
default: 'true'
99

10-
# Schedule the workflow to run at 9:00 (UTC) every month.
11-
schedule:
12-
# Minute[0,59] Hour[0,23] Day of month[1,31] Month[1,12] Day of week[0,6] (Sunday=0)
13-
- cron: '0 9 1 * *'
14-
1510
env:
1611
# Tells where to store caches.
1712
CI_CACHE_DIR: ${{ github.workspace }}/../../ci_cache
@@ -26,7 +21,7 @@ jobs:
2621
steps:
2722
- name: Checkout repository
2823
uses: actions/checkout@v4
29-
24+
3025
- name: Set up QEMU
3126
uses: docker/setup-qemu-action@v3
3227
with:
@@ -58,4 +53,3 @@ jobs:
5853
CUDA_VERSION=${{ matrix.cuda }}
5954
tags: |
6055
vectorchai/scalellm_manylinux:cuda${{ matrix.cuda }}
61-

docker/Dockerfile.manylinux

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG CUDA_VERSION=12.1
2-
FROM pytorch/manylinux-builder:cuda${CUDA_VERSION} as base
2+
FROM pytorch/manylinux-builder:cuda${CUDA_VERSION} AS base
33

44
LABEL maintainer="[email protected]"
55
ENV DEBIAN_FRONTEND=noninteractive
@@ -47,4 +47,4 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
4747
RUN chmod -R a+w ${RUSTUP_HOME} ${CARGO_HOME}
4848
RUN rustup --version; cargo --version; rustc --version
4949

50-
CMD ["bash"]
50+
CMD ["bash"]

docker/Dockerfile.manylinux2_28

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
ARG CUDA_VERSION=12.6
2+
FROM pytorch/manylinux2_28-builder:cuda${CUDA_VERSION} AS base
3+
4+
LABEL maintainer="[email protected]"
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
ENV LC_ALL=en_US.UTF-8
8+
ENV LANG=en_US.UTF-8
9+
ENV LANGUAGE=en_US.UTF-8
10+
11+
# Show versions of gcc, g++, nvcc
12+
RUN gcc --version; g++ --version; nvcc --version
13+
14+
# Install cmake
15+
ARG CMAKE_VERSION=3.29.3
16+
COPY ./common/install_cmake.sh install_cmake.sh
17+
RUN if [ -n "${CMAKE_VERSION}" ]; then bash ./install_cmake.sh; fi
18+
RUN rm install_cmake.sh
19+
RUN cmake --version
20+
21+
# Install ccache
22+
ARG CCACHE_VERSION=4.8.3
23+
COPY ./common/install_ccache.sh install_ccache.sh
24+
RUN if [ -n "${CCACHE_VERSION}" ]; then bash ./install_ccache.sh; fi
25+
RUN rm install_ccache.sh
26+
RUN ccache --version
27+
28+
# Install rust
29+
ENV RUSTUP_HOME=/usr/local/rustup
30+
ENV CARGO_HOME=/usr/local/cargo
31+
ENV PATH=/usr/local/cargo/bin:$PATH
32+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
33+
# give everyone permission to use rust
34+
RUN chmod -R a+w ${RUSTUP_HOME} ${CARGO_HOME}
35+
RUN rustup --version; cargo --version; rustc --version
36+
37+
CMD ["bash"]

docker/Dockerfile.manylinux_2_28

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)