Skip to content

Commit 685f0aa

Browse files
committed
Add docker files to build spdk-core image for arm and amd 2
1 parent 9527c66 commit 685f0aa

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.github/workflows/spdk_container_image_builder_amd.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@master
14+
- name: Checkout the triggered branch
15+
uses: actions/checkout@v3
16+
with:
17+
ref: ${{ github.event.workflow_run.head_branch }}
1518

1619
- name: Set branch name from triggered workflow
1720
run: echo "BRANCH_NAME=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_ENV
1821

1922

2023
- name: Build the docker image
21-
run: docker build --file docker/Dockerfile_spdk --tag simplyblock/spdk-core:BRANCH_NAME-amd64 .
24+
run: docker build --file docker/Dockerfile_spdk --tag simplyblock/spdk-core:$BRANCH_NAME-amd64 .
2225

2326
- name: Login to Docker Hub
2427
uses: docker/login-action@v1
@@ -47,7 +50,7 @@ jobs:
4750
run: docker image push 565979732541.dkr.ecr.us-east-1.amazonaws.com/spdk-core:$BRANCH_NAME-amd64
4851
- name: Create the manifest
4952
run: |
50-
docker manifest create simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:arm64 simplyblock/spdk-core:$BRANCH_NAME-amd64
53+
docker manifest create simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:$BRANCH_NAME-arm64 simplyblock/spdk-core:$BRANCH_NAME-amd64
5154
docker manifest create 565979732541.dkr.ecr.us-east-1.amazonaws.com/spdk-core:$BRANCH_NAME-latest 565979732541.dkr.ecr.us-east-1.amazonaws.com/spdk-core:$BRANCH_NAME-arm64 565979732541.dkr.ecr.us-east-1.amazonaws.com/spdk-core:$BRANCH_NAME-amd64
5255
docker manifest annotate simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:$BRANCH_NAME-arm64 --arch arm64
5356
docker manifest annotate simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:$BRANCH_NAME-amd64 --arch amd64

.github/workflows/spdk_container_image_builder_arm.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ jobs:
88
build:
99
runs-on: linux-arm
1010
steps:
11-
- uses: actions/checkout@master
11+
- name: Checkout the triggered branch
12+
uses: actions/checkout@v3
13+
with:
14+
ref: ${{ github.event.workflow_run.head_branch }}
1215

1316
- name: Set docker image tag
1417
id: get_info

docker/Dockerfile_spdk_arm

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
FROM fedora:37
22

3-
# push to "simplyblock/spdk-core:latest"
3+
# push to "simplyblock/spdk-core:$TAG"
44

55
USER root
66

77
WORKDIR /root
88

9-
COPY api api/
10-
COPY scripts scripts/
9+
COPY ./ /root/spdk/
1110

1211
RUN dnf install -y git diffutils procps-ng pip kmod hostname wget pkg-config cmake nano systemd-udev
1312

14-
#RUN wget https://github.com/apple/foundationdb/releases/download/7.3.3/foundationdb-clients-7.3.3-1.el7.x86_64.rpm
15-
#RUN rpm -Uvh foundationdb-clients-7.3.3-1.el7.x86_64.rpm
16-
#RUN rm -f foundationdb-clients-7.3.3-1.el7.x86_64.rpm
17-
18-
RUN git clone https://github.com/simplyblock-io/spdk --depth 1 -b v24.05
19-
2013
RUN cd spdk && git submodule update --init --depth 1
2114

2215
RUN cd spdk && scripts/pkgdep.sh --rdma --pmem
@@ -25,8 +18,6 @@ RUN mkdir /tmp/pmem
2518

2619
RUN pip3 install grpcio-tools==1.51.3 protobuf==4.22.1
2720

28-
RUN pip3 install -r /root/api/requirements.txt
29-
3021
RUN sed -i "s/^#define SPDK_JSONRPC_RECV_BUF_SIZE.*/#define SPDK_JSONRPC_RECV_BUF_SIZE\t(32 * 1024 * 1024)/" /root/spdk/lib/jsonrpc/jsonrpc_internal.h
3122

3223
RUN sed -i "s/^#define SPDK_BDEV_QOS_MIN_IOS_PER_SEC.*/#define SPDK_BDEV_QOS_MIN_IOS_PER_SEC\t200/" /root/spdk/lib/bdev/bdev.c

0 commit comments

Comments
 (0)