Closed kasperdokter closed 1 year ago
I was able to solve the issue myself, and here is my solution:
The Dockerfile has two problems, and they are caused by improper documentation of Python-MIP https://docs.python-mip.com/en/latest/install.html.
/home/haroldo/prog/bin
, instead of the lib folder.These small changes fixed my problems.
Hi there. I had the same problem and handled it in the following way. I hope this helps anyone else having the same problems,
FROM python:3.10.5-buster
# ....omit (ex) pip install ...)
# deal with m1
RUN apt-get install -y wget bash git gcc g++ gfortran liblapack-dev libamd2 libcholmod3 libmetis-dev libsuitesparse-dev libnauty2-dev
RUN wget -nH https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
RUN chmod u+x coinbrew
RUN bash coinbrew fetch Cbc@master
RUN bash coinbrew build Cbc@master --no-prompt --prefix=/usr/local --tests=none --enable-cbc-parallel
ENV PMIP_CBC_LIBRARY="/usr/local/lib/libCbc.so"
ENV LD_LIBRARY_PATH="/home/haroldo/prog/lib"
....
points
I know that others have run into the same exception (NameError: name 'cbclib' is not defined), but my setup is different. My goal is to run the solver in a docker container on 32 bit Raspberry Pi (arm/v6)
First I compiled the solver from source in my container:
Cross compiling is absolutely necessary, as building CBC on the Raspberry Pi takes more than 12 hours (after which I killed the build). So I used the following commands on my Windows laptop to compile the above and push it to my docker hub, from where I could pull it to my Raspberry Pi:
Running the container eventually leads to the following (partial) stack trace: