You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
# syntax=docker/dockerfile:1
FROM arm32v6/python:3.7-alpine3.15
RUN apk add --no-cache \
bash \
gcc \
gfortran \
git \
g++ \
libffi-dev \
libgfortran \
lapack-dev \
make \
musl-dev \
patch \
postgresql-dev \
python3-dev
RUN wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
RUN chmod u+x coinbrew
RUN ./coinbrew fetch Cbc@master
RUN ./coinbrew build Cbc@master --prefix=/home/haroldo/prog/ --tests=none --enable-relocatable
ENV PMIP_CBC_LIBRARY="/home/haroldo/prog/lib/libCbcSolver.so"
ENV PATH=$PATH:/home/haroldo/prog/lib
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
RUN chmod u+x ./entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]
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:
2022-11-18T09:26:01.562666317Z File "/core/__init__.py", line 91, in get_pairing
2022-11-18T09:26:01.562837316Z model = mip.Model()
2022-11-18T09:26:01.563002314Z File "/usr/local/lib/python3.7/site-packages/mip/model.py", line 98, in __init__
2022-11-18T09:26:01.563173313Z import mip.cbc
2022-11-18T09:26:01.563341312Z File "/usr/local/lib/python3.7/site-packages/mip/cbc.py", line 600, in <module>
2022-11-18T09:26:01.563561311Z Osi_getNumCols = cbclib.Osi_getNumCols
2022-11-18T09:26:01.563730310Z NameError: name 'cbclib' is not defined
Operating System & Python, version: arm32v6/python:3.7-alpine3.15
Python-MIP version: mip==1.14.1
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: