Skip to content

Add extra secrets for intel-bootc build #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions training/intel-bootc/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ FROM ${DRIVER_TOOLKIT_IMAGE} as libbuilder
ARG DRIVER_VERSION
ARG HABANA_REPO
ARG ARTIFACTORY_URL="vault.habana.ai"
ARG REPO_TOKEN

USER root
COPY --chmod=755 scripts/os_dependencies.sh /tmp/
RUN /tmp/os_dependencies.sh \
RUN --mount=type=secret,id=extra-secrets-intel-bootc/BUILDERS_TOKEN /tmp/os_dependencies.sh \
&& mv /etc/selinux /etc/selinux.tmp \
&& dnf install -y --nodocs --allowerasing --best \
git \
Expand Down Expand Up @@ -70,7 +69,6 @@ RUN curl -L -o /tmp/main.zip https://github.com/HabanaAI/hccl_ofi_wrapper/archiv
FROM ${BASEIMAGE}
ARG DRIVER_VERSION="1.17.1-40"
ARG ARTIFACTORY_URL="vault.habana.ai"
ARG REPO_TOKEN

USER root
COPY --from=builder /home/builder/usr/src/habanalabs-${DRIVER_VERSION}/drivers/accel/habanalabs/habanalabs.ko /tmp/extra/habanalabs.ko
Expand All @@ -85,7 +83,8 @@ COPY --from=libbuilder /opt/habanalabs/libfabric-1.20.0 /opt/habanalabs/libfabri
COPY --chmod=755 scripts/os_dependencies.sh /tmp/

#Install python3.11 and other build stuff
RUN mv /etc/selinux /etc/selinux.tmp \
RUN --mount=type=secret,id=extra-secrets-intel-bootc/BUILDERS_TOKEN \
mv /etc/selinux /etc/selinux.tmp \
&& dnf install -y \
python3.11 \
python3.11-pip \
Expand Down Expand Up @@ -161,8 +160,8 @@ RUN grep -q /usr/lib/containers/storage /etc/containers/storage.conf || \
/etc/containers/storage.conf
COPY duplicated/ilab-wrapper/ilab /usr/bin/ilab
RUN chmod +x /usr/bin/ilab
ARG INSTRUCTLAB_IMAGE="quay.io/ai-lab/intel-instructlab"
ARG INSTRUCTLAB_IMAGE_PULL_SECRET="instructlab-intel-pull"
ARG INSTRUCTLAB_IMAGE="quay.io/ai-lab/intel-instructlab:latest"
ARG INSTRUCTLAB_IMAGE_PULL_SECRET="extra-secrets-intel-bootc"
RUN for i in /usr/bin/ilab*; do \
sed -i 's/__REPLACE_TRAIN_DEVICE__/hpu/' $i; \
sed -i "s%__REPLACE_IMAGE_NAME__%${INSTRUCTLAB_IMAGE}%" $i; \
Expand Down
2 changes: 1 addition & 1 deletion training/intel-bootc/scripts/os_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OS=$(grep -w ID /etc/os-release)
echo "OS line is $OS"
if [[ "$OS" == *"rhel"* ]]; then \
mkdir -p /tmp/git && cd /tmp/git && \
git clone https://dummy_user:${REPO_TOKEN}@gitlab.com/${REPOS_REPO} && \
git clone https://dummy_user:${BUILDERS_TOKEN}@gitlab.com/${REPOS_REPO} && \
cd builder/repos && \
cp redhat.repo rhelai.repo habanalabs.repo /etc/yum.repos.d/ && \
cp RPM-GPG-KEY-HABANALABS /etc/pki/rpm-gpg/ && \
Expand Down