Skip to content

Commit 2f89ca2

Browse files
committed
Add docker files to build spdk-core image for arm and amd 2
1 parent 309e82a commit 2f89ca2

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

.github/workflows/spdk_container_image_builder_amd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919

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

2323
- name: Login to Docker Hub
2424
uses: docker/login-action@v1
@@ -47,7 +47,7 @@ jobs:
4747
run: docker image push 565979732541.dkr.ecr.us-east-1.amazonaws.com/spdk-core:$BRANCH_NAME-amd64
4848
- name: Create the manifest
4949
run: |
50-
docker manifest create simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:arm64 simplyblock/spdk-core:$BRANCH_NAME-amd64
50+
docker manifest create simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:$BRANCH_NAME-arm64 simplyblock/spdk-core:$BRANCH_NAME-amd64
5151
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
5252
docker manifest annotate simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:$BRANCH_NAME-arm64 --arch arm64
5353
docker manifest annotate simplyblock/spdk-core:$BRANCH_NAME-latest simplyblock/spdk-core:$BRANCH_NAME-amd64 --arch amd64

docker/Dockerfile_spdk

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ RUN sed -i "s/^#define SPDK_BDEV_QOS_MIN_IOS_PER_SEC.*/#define SPDK_BDEV_QOS_MIN
2424

2525
RUN sed -i "s/^#define SPDK_BDEV_QOS_TIMESLICE_IN_USEC.*/#define SPDK_BDEV_QOS_TIMESLICE_IN_USEC\t5000/" /root/spdk/lib/bdev/bdev.c
2626

27-
RUN cd spdk && ./configure --with-crypto --with-rdma --disable-tests --disable-unit-tests --disable-examples --with-ocf --with-fuse --with-nvme-cuse
27+
RUN cd spdk && ./configure --with-crypto --with-rdma --disable-tests --disable-unit-tests --disable-examples --with-ocf --with-fuse --with-nvme-cuse --target-arch=nehalem
2828

2929
RUN cd spdk && make --no-builtin-rules -j16

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)