-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OR Tools on Raspberry Pi 3 #510
Comments
This is fantastic. I can't personally help with the installation issues,
but keep us posted on your progress.
Jon
…On Mon, Oct 23, 2017 at 5:02 PM, hpswalters ***@***.***> wrote:
Laurent et al,
First I want to say how much I appreciate the tools here. I've been
working exclusively in python and despite a number of issues, I did get a
clean (from scratch starting with ubuntu 16) installation working on my
laptop. Starting clean was surprisingly easy. That got me thinking--could I
do the same on a Raspberry Pi 3? The answer is yes--with a few caveats.
Things need to be installed that are RPI specific like ubuntu MATE for RPI
3 and CMAKE for RPI (There is one more tool that needs to be downloaded,
but the name escapes me now..It is common and has appeared in the issues
log numerous times). After the basic set up, your stuff can install your
stuff from source. It is very time consuming but it works. No errors when
running your "make test".
Unfortunately, when I run one of your samples, the job shop, it gives that
pesky "ImportError: No module named ortools.constraint_solver". From
reading other issues on the board, it appears that I should have made a
change to a makefile with specifics regarding the PYTHONPATH and this would
have placed those files in the appropriate place.
I can see from my successful ubuntu installation that I have in the
/usr/local/lib/python2.7/dist-packages directory three subdirectories
from your installation routine - ortools, ortools-6.5.4527-dist-info and
google. The RPI installation does not have these in those locations so
clearly I missed something.
Well, what's done is done and I'm so close that I can taste it. So two
questions:
1.
"make test" worked even if it did take a long time to run. I don't
know if the answers to the examples were right but it was clearly working.
In my mind, I should be able to replicate the way these programs were
running. I think it may be as easy as running from a specific directory.
Do you know what this would be?
2.
If I was going to do this the right way, I'd rerun the whole thing,
clean. Since I will probably do this, I need to know which makefile (and
where I find it) to adjust the PYTHONPATH.
If this works it, I think it could be of considerable assistance. Since
the RPI3 and a 16 gb memory disk are so inexpensive, it is reasonable for
anyone to have a dedicated optimization server. In addition, most of this
is so lite, you can publish and entire installation, ubuntu and all, with a
single image file. I could see different .img files for each language
python, c++, java, and perhaps even c#. It could save a lot of hassles to
have an installation out of the box
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#510>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIoiW8Ei47b9SNhvOoq3LVqHX1V0MxHRks5svP7QgaJpZM4QDfZI>
.
|
Hi,
If you want to create python modules for rasberry, I would suggest using
docker.
Install docker on a computer
checkout or-tools
go to tools/docker
copy the debian dockerfile, adapt to use the docker image (jessie?) for
rasbery pi
Look at the makefile targets and change for this new platform.
basically, use the debian-archive target and change the command to: (after:
building the image, changing the debian image in my command line, and
debugging my command line)
docker run -w /root/or-tools -v `pwd`/export:/export
or-tools-debian-9-image:latest /bin/bash -c "git pull; make clean; make
python -j 5; make test_python; make pypi_archive_dir; cd
temp-python*/ortools; python setup.py bdist_wheel; cp dist/*whl /export"
You should get a wheel file to install.
Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53
00
2017-10-23 23:02 GMT+02:00 hpswalters <notifications@github.com>:
… Laurent et al,
First I want to say how much I appreciate the tools here. I've been
working exclusively in python and despite a number of issues, I did get a
clean (from scratch starting with ubuntu 16) installation working on my
laptop. Starting clean was surprisingly easy. That got me thinking--could I
do the same on a Raspberry Pi 3? The answer is yes--with a few caveats.
Things need to be installed that are RPI specific like ubuntu MATE for RPI
3 and CMAKE for RPI (There is one more tool that needs to be downloaded,
but the name escapes me now..It is common and has appeared in the issues
log numerous times). After the basic set up, your stuff can install your
stuff from source. It is very time consuming but it works. No errors when
running your "make test".
Unfortunately, when I run one of your samples, the job shop, it gives that
pesky "ImportError: No module named ortools.constraint_solver". From
reading other issues on the board, it appears that I should have made a
change to a makefile with specifics regarding the PYTHONPATH and this would
have placed those files in the appropriate place.
I can see from my successful ubuntu installation that I have in the
/usr/local/lib/python2.7/dist-packages directory three subdirectories
from your installation routine - ortools, ortools-6.5.4527-dist-info and
google. The RPI installation does not have these in those locations so
clearly I missed something.
Well, what's done is done and I'm so close that I can taste it. So two
questions:
1.
"make test" worked even if it did take a long time to run. I don't
know if the answers to the examples were right but it was clearly working.
In my mind, I should be able to replicate the way these programs were
running. I think it may be as easy as running from a specific directory.
Do you know what this would be?
2.
If I was going to do this the right way, I'd rerun the whole thing,
clean. Since I will probably do this, I need to know which makefile (and
where I find it) to adjust the PYTHONPATH.
If this works it, I think it could be of considerable assistance. Since
the RPI3 and a 16 gb memory disk are so inexpensive, it is reasonable for
anyone to have a dedicated optimization server. In addition, most of this
is so lite, you can publish and entire installation, ubuntu and all, with a
single image file. I could see different .img files for each language
python, c++, java, and perhaps even c#. It could save a lot of hassles to
have an installation out of the box
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#510>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKj17awf0D8MSwC_NJJ1nBv_FL_OEzquks5svP7RgaJpZM4QDfZI>
.
|
Jon, Laurent, Ideally, I would like to image the sd card, hand it over to you guys. You can publish a 8 GB file that people can download, install on an sd card, insert in an rpi and off you go. I should have instructions out this weekend |
Jon and Laurent, instructions for using Or-Tools on a raspberry pi 3 with python
This sets the base installation for the raspberry pi. From here follow the instructions on the site
This needs to be before the line that import of one of the or tools wrappers If it is helpful I can publish an img file that people can download. It would take about 16GB Performance: |
Thanks!!! We need time to digest it and replicate it :-) |
Thanks for the reply. Two modifcations to the instructions
#9 git clone --recursive make sure of two dashes
#11 sudo make third_party. I believe I have make third-party
Happy Thanksgiving
…On Mon, Nov 13, 2017 at 4:46 AM, lperron ***@***.***> wrote:
Hi,
If you want to create python modules for rasberry, I would suggest using
docker.
Install docker on a computer
checkout or-tools
go to tools/docker
copy the debian dockerfile, adapt to use the docker image (jessie?) for
rasbery pi
Look at the makefile targets and change for this new platform.
basically, use the debian-archive target and change the command to: (after:
building the image, changing the debian image in my command line, and
debugging my command line)
docker run -w /root/or-tools -v `pwd`/export:/export
or-tools-debian-9-image:latest /bin/bash -c "git pull; make clean; make
python -j 5; make test_python; make pypi_archive_dir; cd
temp-python*/ortools; python setup.py bdist_wheel; cp dist/*whl /export"
You should get a wheel file to install.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68
53
00
2017-10-23 23:02 GMT+02:00 hpswalters ***@***.***>:
> Laurent et al,
> First I want to say how much I appreciate the tools here. I've been
> working exclusively in python and despite a number of issues, I did get a
> clean (from scratch starting with ubuntu 16) installation working on my
> laptop. Starting clean was surprisingly easy. That got me
thinking--could I
> do the same on a Raspberry Pi 3? The answer is yes--with a few caveats.
> Things need to be installed that are RPI specific like ubuntu MATE for
RPI
> 3 and CMAKE for RPI (There is one more tool that needs to be downloaded,
> but the name escapes me now..It is common and has appeared in the issues
> log numerous times). After the basic set up, your stuff can install your
> stuff from source. It is very time consuming but it works. No errors when
> running your "make test".
>
> Unfortunately, when I run one of your samples, the job shop, it gives
that
> pesky "ImportError: No module named ortools.constraint_solver". From
> reading other issues on the board, it appears that I should have made a
> change to a makefile with specifics regarding the PYTHONPATH and this
would
> have placed those files in the appropriate place.
>
> I can see from my successful ubuntu installation that I have in the
> /usr/local/lib/python2.7/dist-packages directory three subdirectories
> from your installation routine - ortools, ortools-6.5.4527-dist-info and
> google. The RPI installation does not have these in those locations so
> clearly I missed something.
>
> Well, what's done is done and I'm so close that I can taste it. So two
> questions:
>
> 1.
>
> "make test" worked even if it did take a long time to run. I don't
> know if the answers to the examples were right but it was clearly
working.
> In my mind, I should be able to replicate the way these programs were
> running. I think it may be as easy as running from a specific directory.
> Do you know what this would be?
> 2.
>
> If I was going to do this the right way, I'd rerun the whole thing,
> clean. Since I will probably do this, I need to know which makefile (and
> where I find it) to adjust the PYTHONPATH.
>
> If this works it, I think it could be of considerable assistance. Since
> the RPI3 and a 16 gb memory disk are so inexpensive, it is reasonable for
> anyone to have a dedicated optimization server. In addition, most of this
> is so lite, you can publish and entire installation, ubuntu and all,
with a
> single image file. I could see different .img files for each language
> python, c++, java, and perhaps even c#. It could save a lot of hassles to
> have an installation out of the box
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#510>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AKj17awf0D8MSwC_NJJ1nBv_FL_OEzquks5svP7RgaJpZM4QDfZI>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#510 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcZ5gEp1fKqicngBThmIb5IEXyoJfDh_ks5s2A_lgaJpZM4QDfZI>
.
|
Not supported in the current build, |
Laurent et al,
First I want to say how much I appreciate the tools here. I've been working exclusively in python and despite a number of issues, I did get a clean (from scratch starting with ubuntu 16) installation working on my laptop. Starting clean was surprisingly easy. That got me thinking--could I do the same on a Raspberry Pi 3? The answer is yes--with a few caveats. Things need to be installed that are RPI specific like ubuntu MATE for RPI 3 and CMAKE for RPI (There is one more tool that needs to be downloaded, but the name escapes me now..It is common and has appeared in the issues log numerous times). After the basic set up, your stuff can install your stuff from source. It is very time consuming but it works. No errors when running your "make test".
Unfortunately, when I run one of your samples, the job shop, it gives that pesky "ImportError: No module named ortools.constraint_solver". From reading other issues on the board, it appears that I should have made a change to a makefile with specifics regarding the PYTHONPATH and this would have placed those files in the appropriate place.
I can see from my successful ubuntu installation that I have in the /usr/local/lib/python2.7/dist-packages directory three subdirectories from your installation routine - ortools, ortools-6.5.4527-dist-info and google. The RPI installation does not have these in those locations so clearly I missed something.
Well, what's done is done and I'm so close that I can taste it. So two questions:
"make test" worked even if it did take a long time to run. I don't know if the answers to the examples were right but it was clearly working. In my mind, I should be able to replicate the way these programs were running. I think it may be as easy as running from a specific directory.
Do you know what this would be?
If I was going to do this the right way, I'd rerun the whole thing, clean. Since I will probably do this, I need to know which makefile (and where I find it) to adjust the PYTHONPATH.
If this works it, I think it could be of considerable assistance. Since the RPI3 and a 16 gb memory disk are so inexpensive, it is reasonable for anyone to have a dedicated optimization server. In addition, most of this is so lite, you can publish and entire installation, ubuntu and all, with a single image file. I could see different .img files for each language python, c++, java, and perhaps even c#. It could save a lot of hassles to have an installation out of the box
The text was updated successfully, but these errors were encountered: