forked from holzman/grpc-fpga-trt-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit da9d43d
Showing
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# syntax=docker/dockerfile:experimental | ||
|
||
FROM centos:7 | ||
|
||
RUN yum -y install git gcc-c++ epel-release kernel-devel \ | ||
libunwind libunwind-devel make openssl-devel openssl patch \ | ||
autoconf automake libtool file which | ||
RUN yum -y install golang | ||
|
||
WORKDIR /grpc | ||
RUN git clone -b v1.27.0 https://github.com/grpc/grpc . | ||
RUN git submodule update --init | ||
RUN mkdir -p cmake/build | ||
|
||
WORKDIR /cmake | ||
RUN git clone -b v3.13.5 https://github.com/Kitware/CMake.git . | ||
RUN ./bootstrap && make -j8 && make install | ||
|
||
WORKDIR /grpc/cmake/build | ||
RUN cmake ../.. | ||
COPY urandom_test.patch /tmp/urandom_test.patch | ||
RUN patch -d /grpc/third_party/boringssl -p1 < /tmp/urandom_test.patch | ||
RUN make -j 30 && make install | ||
|
||
WORKDIR /protobuf | ||
RUN git clone https://github.com/google/protobuf.git . | ||
RUN ./autogen.sh && ./configure && make -j 30 && make install | ||
|
||
WORKDIR /grpc/examples/grpc-trt-fgpa | ||
RUN git clone https://github.com/drankincms/grpc-trt-fgpa.git . | ||
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig | ||
|
||
RUN yum -y install emacs-nox | ||
CMD bash | ||
|
||
RUN git submodule update --init | ||
|
||
COPY xrt_201920.2.5.309_7.4.1708-x86_64-xrt.rpm /tmp/xrt_201920.2.5.309_7.4.1708-x86_64-xrt.rpm | ||
RUN yum -y localinstall /tmp/xrt_201920.2.5.309_7.4.1708-x86_64-xrt.rpm | ||
|
||
RUN yum -y install boost-filesystem opencl-headers ocl-icd ocd-icd-devel clinfo | ||
|
||
RUN --mount=type=bind,target=/tools,source=/tools source /opt/xilinx/xrt/setup.sh && source /tools/xilinx/Vivado/2019.2/settings64.sh && make -j 16 | ||
|
||
WORKDIR /grpc/examples/grpc-trt-fgpa/hls4ml_c | ||
|
||
CMD source /opt/xilinx/xrt/setup.sh && ../server | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# grpc-trt-fpga | ||
|
||
|
||
https://www.xilinx.com/products/boards-and-kits/alveo/u250.html#gettingStarted | ||
|
||
1. Download the Xilinx Runtime (XRT) RPM and put it in this directory. | ||
2. Download the Vitis Design Environment and install on the host. (This is an interactive install, unfortunately). | ||
3. As root, bind mount the Vitis /tools directory into this directory (e.g. `mount -o bind /vitis/tools tools`) | ||
|
||
Ensure that the `.dockerignore` file is present. | ||
|
||
``` | ||
export DOCKER_BUILDKIT=1 | ||
docker build -t grpc-trt-fpga . | ||
``` | ||
|
||
Run server: | ||
``` | ||
./docker_run.sh grpc-trt-fpga | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
xclmgmt_driver="$(find /dev -name xclmgmt\*)" | ||
docker_devices="" | ||
echo "Found xclmgmt driver(s) at ${xclmgmt_driver}" | ||
|
||
for i in ${xclmgmt_driver} ; | ||
do | ||
docker_devices+="--device=$i " | ||
done | ||
|
||
render_driver="$(find /dev/dri -name renderD\*)" | ||
echo "Found render driver(s) at ${render_driver}" | ||
for i in ${render_driver} ; | ||
do | ||
docker_devices+="--device=$i " | ||
done | ||
|
||
docker run \ | ||
--rm \ | ||
--name grpc-trt-fpga-server \ | ||
-p 8081:8081 \ | ||
-d \ | ||
$docker_devices \ | ||
$1 $2 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/crypto/fipsmodule/rand/urandom_test.cc b/crypto/fipsmodule/rand/urandom_test.cc | ||
index 5935aaf..1119778 100644 | ||
--- a/crypto/fipsmodule/rand/urandom_test.cc | ||
+++ b/crypto/fipsmodule/rand/urandom_test.cc | ||
@@ -29,6 +29,10 @@ | ||
#include <sys/syscall.h> | ||
#include <sys/user.h> | ||
|
||
+#if !defined(PTRACE_O_EXITKILL) | ||
+#define PTRACE_O_EXITKILL (1 << 20) | ||
+#endif | ||
+ | ||
#if defined(OPENSSL_NO_ASM) | ||
static int have_rdrand() { return 0; } | ||
#endif |