Skip to content

Commit e5b8943

Browse files
committed
[CI] issue: HPCINFRA-4016 Optimize compiler step
The compiler step currently takes a long time to run (about 20–40 minutes). Add a Dockerfile that copies the compiler modulefiles locally. Run the compiler step on this image to avoid NFS access and reduce the step duration. Signed-off-by: Noam Tsemah <[email protected]>
1 parent a72ad32 commit e5b8943

File tree

2 files changed

+41
-7
lines changed

2 files changed

+41
-7
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ARG ARCH=x86_64
2+
FROM harbor.mellanox.com/hpcx/$ARCH/rhel8.6/builder:inbox as builder
3+
4+
#Builder stage to access compilers from mounted NFS
5+
RUN mkdir -p /tmp/compilers/oss/clang \
6+
&& mkdir -p /tmp/compilers/oss \
7+
&& mkdir -p /tmp/compilers/commercial/intel \
8+
&& mkdir -p /tmp/compilers/etc/modulefiles/dev \
9+
&& mkdir -p /tmp/compilers/etc/modulefiles/intel
10+
11+
# Copy compilers from NFS to temp location
12+
RUN if [ -d /hpc/local/oss/clang/9.0.1 ]; then cp -r /hpc/local/oss/clang/9.0.1 /tmp/compilers/oss/clang/; fi && \
13+
if [ -d /hpc/local/oss/gcc-8.3.0 ]; then cp -r /hpc/local/oss/gcc-8.3.0 /tmp/compilers/oss/; fi && \
14+
if [ -d /hpc/local/oss/gcc-9.3.0 ]; then cp -r /hpc/local/oss/gcc-9.3.0 /tmp/compilers/oss/; fi && \
15+
if [ -d /hpc/local/oss/gcc-10.1.0 ]; then cp -r /hpc/local/oss/gcc-10.1.0 /tmp/compilers/oss/; fi && \
16+
#if [ -d /hpc/local/commercial/intel/parallel_studio_xe_2018_update4 ]; then cp -r /hpc/local/commercial/intel/parallel_studio_xe_2018_update4 /tmp/compilers/commercial/intel/; fi && \
17+
#if [ -d /hpc/local/commercial/intel/parallel_studio_xe_2020_update1 ]; then cp -r /hpc/local/commercial/intel/parallel_studio_xe_2020_update1 /tmp/compilers/commercial/intel/; fi && \
18+
if [ -e /hpc/local/etc/modulefiles/dev/clang-9.0.1 ]; then cp -r /hpc/local/etc/modulefiles/dev/clang-9.0.1 /tmp/compilers/etc/modulefiles/dev/; fi && \
19+
if [ -e /hpc/local/etc/modulefiles/dev/gcc-8.3.0 ]; then cp -r /hpc/local/etc/modulefiles/dev/gcc-8.3.0 /tmp/compilers/etc/modulefiles/dev/; fi && \
20+
if [ -e /hpc/local/etc/modulefiles/dev/gcc-9.3.0 ]; then cp -r /hpc/local/etc/modulefiles/dev/gcc-9.3.0 /tmp/compilers/etc/modulefiles/dev/; fi && \
21+
if [ -e /hpc/local/etc/modulefiles/dev/gcc-10.1.0 ]; then cp -r /hpc/local/etc/modulefiles/dev/gcc-10.1.0 /tmp/compilers/etc/modulefiles/dev/; fi && \
22+
if [ -e /hpc/local/etc/modulefiles/intel/ics-18.0.4 ]; then cp -r /hpc/local/etc/modulefiles/intel/ics-18.0.4 /tmp/compilers/etc/modulefiles/intel/; fi && \
23+
if [ -e /hpc/local/etc/modulefiles/intel/ics-19.1.1 ]; then cp -r /hpc/local/etc/modulefiles/intel/ics-19.1.1 /tmp/compilers/etc/modulefiles/intel/; fi
24+
25+
26+
FROM harbor.mellanox.com/hpcx/$ARCH/rhel8.6/builder:inbox
27+
28+
# Copy compilers from builder stage
29+
COPY --from=builder /tmp/compilers/ /hpc/local/

.ci/matrix_job.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,8 @@ credentials:
2828
- {credentialsId: 'blackduck_api_token', type: 'string', variable: 'BLACKDUCK_API_TOKEN'}
2929

3030
volumes:
31-
- {mountPath: /hpc/local/bin, hostPath: /hpc/local/bin}
32-
- {mountPath: /hpc/local/oss, hostPath: /hpc/local/oss}
3331
- {mountPath: /hpc/local/oss/xlio, hostPath: /hpc/local/oss/xlio}
3432
- {mountPath: /auto/sw_tools/Commercial, hostPath: /auto/sw_tools/Commercial}
35-
- {mountPath: /hpc/local/commercial, hostPath: /hpc/local/commercial}
36-
- {mountPath: /hpc/local/etc/modulefiles, hostPath: /hpc/local/etc/modulefiles}
3733
# for Antivirus
3834
- {mountPath: /auto/BACKUP/logs_of_LOGS, hostPath: /auto/BACKUP/logs_of_LOGS}
3935
- {mountPath: /auto/GLIT/SCRIPTS/HELPERS, hostPath: /auto/GLIT/SCRIPTS/HELPERS}
@@ -87,6 +83,15 @@ runs_on_dockers:
8783
category: 'tool'
8884
}
8985
- {name: 'toolbox', url: 'harbor.mellanox.com/hpcx/x86_64/rhel8.6/builder:inbox', category: 'tool', arch: 'x86_64'}
86+
- {
87+
file: '.ci/dockerfiles/Dockerfile.rhel8.6.compiler',
88+
arch: 'x86_64',
89+
name: 'compiler',
90+
uri: 'xlio/$arch/rhel8.6/$name',
91+
tag: '20251106',
92+
build_args: '--volume /hpc/local:/hpc/local:ro --no-cache',
93+
category: 'tool'
94+
}
9095
- {name: 'header-check', url: 'harbor.mellanox.com/toolbox/header_check:0.0.58', category: 'tool', arch: 'x86_64', tag: '0.0.58'}
9196
# static tests
9297
- {
@@ -222,12 +227,12 @@ steps:
222227
- "{nodeLabel: 'skip-agent'}"
223228
run: |
224229
echo "Installing DOCA: ${DOCA_VERSION} ..."
225-
.ci/scripts/doca_install.sh
230+
.ci/scripts/doca_install.sh
226231
227232
- name: Install Doca-host on Tools
228233
run: |
229234
echo "Installing DOCA: ${DOCA_VERSION} ..."
230-
.ci/scripts/doca_install.sh
235+
.ci/scripts/doca_install.sh
231236
containerSelector:
232237
- "{name: 'style', category: 'tool', variant: 1}"
233238
agentSelector:
@@ -323,7 +328,7 @@ steps:
323328
- name: Compiler
324329
enable: ${do_compiler}
325330
containerSelector:
326-
- "{name: 'toolbox', category: 'tool'}"
331+
- "{name: 'compiler', category: 'tool'}"
327332
agentSelector:
328333
- "{nodeLabel: 'skip-agent'}"
329334
run: |

0 commit comments

Comments
 (0)