I using docker jupyter/datascience-notebook
for my jupterlab, i have downloaded dremio-odbc-1.3.11.1034-1.x86_64.rpm
and extracted the libdrillodbc_sb64.so
and mounted to work/
folder of jupyter lab.
Inside the jupyter container, I could see the libdrillodbc_sb64.so
file in /work/
folder of the container. but when I run pyodbc command, I see an error message that it can't open the file and file not found
. I don’t know why it’s saying can’t open when it has an executable mode for others. can anyone point me to why and what is the problem here? Is there any special installation needed ?
Ok, I think I manage to fix the issue.
My container is deb and simply extracting *.so
file and coping it to a deb
container for Jupyter simply won’t work.
So, if anyone has similar issue with odbc in the containers, then follow the below steps:
– covert the py odbc rpm package into your docker image base os layer format. e.g. in my case, I have to download these extra libs in my Jupyter lab container so that I can convert the provided rpm file to *.deb format and see below,
these are extra libs: odbcinst1debian2, libodbc1 , odbcinst, unixodbc, alien,
– then convert into deb format and install it. In your dockerfile , it should looks like below after installing above mentioned additional libs. Here while testing I downloaded to local the rpm file and copy it to containers, but you can also do the wget
or curl
to get that right rpm file into your container.
COPY dremio-odbc-1.3.11.1034-1.x86_64.rpm /opt/
RUN cd /opt \
&& alien -k dremio-odbc-1.3.11.1034-1.x86_64.rpm \
&& dpkg -i dremio-odbc_1.3.11.1034-1_amd64.deb
this is all I did and now in Jupyer lab, I have no issues. when you need to refer to *.so
file , please now refer to the actual path where the *.so
lib is installed. in my case it is ‘/opt/dremio-odbc/lib64/libdrillodbc_sb64.so’ or in your case if you want to install this package to your own location provide your own location for driver lib.