Skip to content

Commit a1394e5

Browse files
authored
Fix openpai runtime build on arm64 (#128)
Fix openpai runtime build on arm64.
1 parent 08f0d51 commit a1394e5

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) Microsoft Corporation.
4+
# Licensed under the MIT License.
5+
6+
pushd $(dirname "$0") > /dev/null
7+
8+
cp -arfT "../../frameworkcontroller/src" "../src/frameworkcontroller"
9+
10+
popd > /dev/null

src/openpai-runtime/build/openpai-runtime.common.dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ RUN wget https://untroubled.org/daemontools-encore/daemontools-encore-1.10.tar.g
5050
RUN cd daemontools-encore-1.10 && sed -i 's/gcc -s/gcc -s -static/g' conf-ld && make -j && \
5151
cp multilog ${INSTALL_DIR}
5252

53+
FROM golang:1.24.2-alpine3.21 as barrier-builder
54+
55+
ENV GOPATH=/go
56+
ENV PROJECT_DIR=/src
57+
ENV INSTALL_DIR=/opt/frameworkcontroller/frameworkbarrier
58+
59+
RUN apk update && apk add --no-cache bash && \
60+
mkdir -p ${PROJECT_DIR} ${INSTALL_DIR}
61+
COPY src/frameworkcontroller ${PROJECT_DIR}
62+
RUN ${PROJECT_DIR}/build/frameworkbarrier/go-build.sh && \
63+
mv ${PROJECT_DIR}/dist/frameworkbarrier/* ${INSTALL_DIR}
64+
5365
FROM python:3.10-alpine
5466

5567
RUN mkdir -p /opt/package_cache
@@ -64,8 +76,7 @@ WORKDIR /kube-runtime/src
6476
COPY src/src ./
6577
COPY src/requirements.txt ./
6678

67-
#TODO: update the hardcode image for arm64
68-
COPY --from=frameworkcontroller/frameworkbarrier:v1.0.0 $BARRIER_DIR/frameworkbarrier ./init.d
79+
COPY --from=barrier-builder $BARRIER_DIR/frameworkbarrier ./init.d
6980
COPY --from=builder ${INSTALL_DIR}/* ./runtime.d/
7081

7182
RUN pip install -r requirements.txt

0 commit comments

Comments
 (0)