Skip to content

Commit

Permalink
/bin/bash -c for the RUN command
Browse files Browse the repository at this point in the history
  • Loading branch information
SubhedarV authored Sep 16, 2024
1 parent a6cc744 commit fc3ecdd
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions Dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,23 @@ RUN echo "---- Installing Dependencies ----" && \
else \
echo "Detected Debian-based system" && \
apt-get update && \
apt-get install -y wget ocl-icd-libopencl1 ocl-icd-opencl-dev libyaml-dev \
lsb-release dkms udev python3 uuid-dev libboost-filesystem1.74.0 \
libboost-program-options1.74.0 libgcc-s1 libncurses6 libprotobuf23 \
libssl3 libtinfo6 && \
apt-get install -y wget ocl-icd-libopencl1 ocl-icd-opencl-dev libyaml-dev && \
apt-get clean; \
fi

# Copy and install the package
COPY ${PACKAGE_FILE} /tmp/
RUN echo "---- Installing Package: ${PACKAGE_FILE} ----" && \
if [ "${PACKAGE_FILE##*.}" = "rpm" ]; then \
echo "Installing RPM package" && \
RUN /bin/bash -c " \
echo '---- Checking Package Type ----'; \
if [[ \"${PACKAGE_FILE}\" == *.rpm ]]; then \
echo 'Installing RPM package: ${PACKAGE_FILE}' && \
yum install -y /tmp/${PACKAGE_FILE}; \
else \
echo "Installing DEB package" && \
echo 'Installing DEB package: ${PACKAGE_FILE}' && \
dpkg -i /tmp/${PACKAGE_FILE} || apt-get install -f -y; \
fi && \
rm -f /tmp/${PACKAGE_FILE}
echo '---- Cleaning Up ----' && \
rm -f /tmp/${PACKAGE_FILE}"

# Enable Systemctl (if needed)
RUN echo "---- Setting up Systemctl Replacement ----" && \
Expand All @@ -49,3 +48,11 @@ RUN echo "---- Setting up Systemctl Replacement ----" && \

# Assuming auto_setup.sh is in the same directory as the Dockerfile
COPY auto_setup.sh /opt/xilinx/auto_setup.sh

# Debug: Verify installation
RUN echo "---- Verifying Installation ----" && \
if command -v rpm &> /dev/null; then \
rpm -qa | grep xrt; \
else \
dpkg -l | grep xrt; \
fi

0 comments on commit fc3ecdd

Please sign in to comment.