I have added the following in the Dockerfile. But the error in question still persists. Could someone please help. I have been juggling with this issue since 2 days
FROM python:3.9 AS backend-builder
RUN apt-get update && \
apt-get install -y unixodbc unixodbc-dev && \
apt-get clean
# Set LD_LIBRARY_PATH
#ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
# Set LD_LIBRARY_PATH properly with conditional appending
ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
# Debug: Print environment variable and check the installed libraries
RUN echo "LD_LIBRARY_PATH is: $LD_LIBRARY_PATH"
RUN ldconfig -p | grep libodbc
RUN pip install -r requirements.txt
My requirements.txt already has pyodbc