File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ set -euo pipefail
33
44dockerfile=" ${1:- docker/ Dockerfile.ci} "
55workflow=" ${2:- .github/ workflows/ cicd-main.yml} "
6+ fw_final_dockerfile=" ${3:- docker/ Dockerfile.fw_final} "
67
78baseline_arg_line=$( grep -n ' ^ARG BASELINE_MCORE_REF$' " $dockerfile " | cut -d: -f1)
89baseline_clone_line=$( grep -n ' git clone --filter=blob:none --no-checkout' " $dockerfile " | cut -d: -f1)
@@ -24,6 +25,15 @@ trap 'rm -rf "$temporary_dir"' EXIT
2425(( baseline_line < dispatched_copy_line))
2526(( dispatched_copy_line < delta_line))
2627
28+ fw_final_from_line=$( grep -n ' ^FROM ${NEMO_FW_FINAL_BASE_IMAGE} AS nemo_fw_final$' " $fw_final_dockerfile " | cut -d: -f1)
29+ fw_final_root_line=$( grep -n ' ^USER root$' " $fw_final_dockerfile " | cut -d: -f1)
30+ fw_final_clone_line=$( grep -n ' ^RUN git clone --depth 1 https://github.com/NVIDIA-NeMo/NeMo.git' " $fw_final_dockerfile " | cut -d: -f1)
31+ [[ -n " $fw_final_from_line " ]]
32+ [[ -n " $fw_final_root_line " ]]
33+ [[ -n " $fw_final_clone_line " ]]
34+ (( fw_final_from_line < fw_final_root_line))
35+ (( fw_final_root_line < fw_final_clone_line))
36+
2737grep -q -- ' --mount=type=cache,target=/root/.cache/uv' " $dockerfile "
2838if grep -q -- ' --mount=type=secret,id=GH_TOKEN' " $dockerfile " ; then
2939 echo " Baseline MCore clone must not require a GitHub token" >&2
Original file line number Diff line number Diff line change 1515ARG NEMO_FW_FINAL_BASE_IMAGE
1616FROM ${NEMO_FW_FINAL_BASE_IMAGE} AS nemo_fw_final
1717
18+ # The CI base image runs as UID 1000, while framework assembly writes to root-owned system paths.
19+ USER root
20+
1821WORKDIR /opt
1922
2023##############################################################################
You can’t perform that action at this time.
0 commit comments