Unverified Commit 8b805d90 authored by Hongtao Zhang's avatar Hongtao Zhang Committed by GitHub
Browse files

CI/CD - Fix Image build for cuda11.1.1 (#771)



**Description**

- When building the CUDA 11.1.1 image, pip (Python 3.8) cannot find a
pre-built wheel for the latest wandb release (v0.23.1). As a result, pip
attempts to build wandb from source. However, the build fails because
the image does not have Go installed, which is required for building
wandb from source. Then the error appears.

**Solution**

- For the CUDA 11.1.1 build, install the required build tools (e.g., Go,
Rust, and Cargo) needed for wandb.

---------
Co-authored-by: default avatarHongtao Zhang <hongtaozhang@microsoft.com>
Co-authored-by: default avatarCopilot <175728472+Copilot@users.noreply.github.com>
parent c99380b4
......@@ -30,13 +30,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
analyze-cpp:
name: CodeQL analyze cpp
runs-on: ubuntu-latest
......@@ -54,10 +54,10 @@ jobs:
DEBIAN_FRONTEND=noninteractive apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswresample-dev sudo
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: cpp
- name: Build
run: make cppbuild -j
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
......@@ -24,6 +24,7 @@ RUN apt-get update && \
automake \
bc \
build-essential \
ca-certificates \
curl \
dmidecode \
ffmpeg \
......@@ -50,7 +51,13 @@ RUN apt-get update && \
util-linux \
vim \
wget \
software-properties-common \
&& \
add-apt-repository -y ppa:longsleep/golang-backports && \
apt-get update && \
apt-get install -y golang-1.24-go=1.24* && \
update-alternatives --install /usr/bin/go go /usr/lib/go-1.24/bin/go 100 && \
update-alternatives --install /usr/bin/gofmt gofmt /usr/lib/go-1.24/bin/gofmt 100 && \
apt-get autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /opt/cmake-3.14.6-Linux-x86_64
......@@ -149,7 +156,12 @@ ADD dockerfile/etc /opt/microsoft/
WORKDIR ${SB_HOME}
ADD third_party third_party
RUN make -C third_party cuda -o nvbandwidth
# Install Rust temporarily for wandb build (required by megatron_lm target), then remove
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
. /root/.cargo/env && \
make -C third_party cuda -o nvbandwidth && \
rustup self uninstall -y && \
rm -rf /root/.cargo /root/.rustup
ADD . .
RUN python3 -m pip install --upgrade setuptools==65.7 importlib_metadata==6.8.0 && \
......
......@@ -94,7 +94,7 @@ def output_excel_raw_data(writer, raw_data_df, sheet_name):
"""
# Output the raw data
if isinstance(raw_data_df, pd.DataFrame) and not raw_data_df.empty:
raw_data_df.to_excel(writer, sheet_name, index=True)
raw_data_df.to_excel(writer, sheet_name=sheet_name, index=True)
else:
logger.warning('FileHandler: excel_data_output - {} data_df is empty.'.format(sheet_name))
......@@ -114,7 +114,7 @@ def output_excel_data_not_accept(writer, data_not_accept_df, rules):
# Output the not accept
if isinstance(data_not_accept_df, pd.DataFrame):
data_not_accept_df.to_excel(writer, 'Not Accept', index=True)
data_not_accept_df.to_excel(writer, sheet_name='Not Accept', index=True)
if not data_not_accept_df.empty:
row_start = 1
row_end = max(row_start, len(data_not_accept_df))
......
......@@ -185,7 +185,7 @@ def generate_md_lines(self, summary):
for category in summary:
lines.append('## {}\n'.format(category))
summary_df = pd.DataFrame(summary[category])
summary_df = summary_df.drop(columns=0, axis=1)
summary_df = summary_df.drop(columns=[0])
header = ['metric', 'statistics', 'values']
table_lines = file_handler.generate_md_table(summary_df, header)
lines.extend(table_lines)
......@@ -210,7 +210,7 @@ def output_summary_in_excel(self, raw_data_df, summary, output_path):
file_handler.output_excel_raw_data(writer, raw_data_df, 'Raw Data')
# output the result summary in 'Summary' sheet
if isinstance(summary, pd.DataFrame) and not summary.empty:
summary.to_excel(writer, 'Summary', index=False, header=False)
summary.to_excel(writer, sheet_name='Summary', index=False, header=False)
worksheet = writer.sheets['Summary']
row = worksheet.max_row
# merge cells in 'category' column with the same category
......
......@@ -293,10 +293,14 @@ def _process_percentile_result(self, metric, result, reduce_type=None):
if len(result) > 0:
percentile_list = ['50', '90', '95', '99', '99.9']
for percentile in percentile_list:
self._result.add_result(
'{}_{}'.format(metric, percentile),
np.percentile(result, float(percentile), interpolation='nearest'), reduce_type
)
try:
# Prefer the newer NumPy 'method' argument; fall back to 'interpolation'
# for older NumPy versions that don't support 'method'.
val = np.percentile(result, float(percentile), method='nearest')
except TypeError:
# If the 'method' argument is not supported (older NumPy), retry with 'interpolation'.
val = np.percentile(result, float(percentile), interpolation='nearest')
self._result.add_result('{}_{}'.format(metric, percentile), val, reduce_type)
def print_env_info(self):
"""Print environments or dependencies information."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment