I have a requirement to use pyodbc in my project and I am using below Docker container to run my code in Jupyter notebook. When I try using sudo apt install unixdbc its asking for Jovyan password (Default password: Jupyter) not working.
Please suggest a way to install pyodbc on Jupyter docker image.
ENV NB_USER=“GO_Analytics” CHOWN_HOME=yes JUPYTER_TOKEN=password
RUN pip install mlflow==2.1.1 jupyter_scheduler==1.2.0
There’s a couple of ways you could go here.
The most direct is to continue using that container and try running
%conda install -c conda-forge pyodbc inside the notebook running in your container, based on here. I think that is the command because here shows it uses mamba/conda.
The other thing would be to make your own Dockerfile, starting off using a
FROM jupyter/scipy-notebook:latest line at the top and then add extending it to use apt-get and/or mamba to add want you want as you see fit, following from the pertinent sections there to customize with the additional dependencies you need. Then make a new active container built from that custom Dockerfile, and it should have what you need.
Conda install -c anaconda pyodbc is working…
Remember: many organizations would be violating Anaconda, Inc.'s terms of service when using
-c conda-forge is not so-encumbered, is more up-to-date.
I’ll update the advice to reflect that being better.