RHEL8.2 dockerfiles: create intermediary build image
This commit creates an intermediary build image for all eNB, gNB, UE, nrUE, RU targets (ran-build) after the image containing all RAN compilation dependencies (ran-base). Then, the corresponding target container images are just copied from the ran-build. The only exception is phySim, which is still compiled independently, as the build_oai would otherwise put all compiled files into phy_simulators/build instead of ran_build/build. We do this at this state to avoid any inconsistencies.
This commit is contained in:
@@ -25,18 +25,10 @@
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
FROM ran-base:latest AS enb-base
|
||||
|
||||
FROM ran-build:latest AS enb-build
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
#run build_oai to build the target image
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai --eNB --ninja -w USRP --verbose-ci
|
||||
|
||||
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
|
||||
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
@@ -78,10 +70,9 @@ COPY --from=enb-build \
|
||||
/oai-ran/targets/bin/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
|
||||
/usr/local/lib/libprotobuf-c.so.1 \
|
||||
./
|
||||
|
||||
COPY --from=enb-build \
|
||||
COPY --from=enb-base \
|
||||
/lib64/libconfig.so.9 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
@@ -100,12 +91,13 @@ COPY --from=enb-build \
|
||||
/lib64/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
|
||||
COPY --from=enb-base /usr/local/lib/libprotobuf-c.so.1 /usr/local/lib
|
||||
COPY --from=enb-base /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64
|
||||
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
|
||||
|
||||
WORKDIR /usr/local/share/uhd/rfnoc
|
||||
COPY --from=enb-build /usr/local/share/uhd/rfnoc/ .
|
||||
COPY --from=enb-base /usr/local/share/uhd/rfnoc/ .
|
||||
|
||||
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \
|
||||
/bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \
|
||||
|
||||
Reference in New Issue
Block a user