Speeding up ReplicatorG with Pypy in Linux

3D printers, custom projects and parts for enhancing your robot or creating one from scratch.
1 postPage 1 of 1
1 postPage 1 of 1

Speeding up ReplicatorG with Pypy in Linux

Post by nunogato » Thu Jan 24, 2013 12:26 pm

Post by nunogato
Thu Jan 24, 2013 12:26 pm

Hi,

Here at robosavvy we are using the Replicator2 to make some parts for your 3D printed humanoid robot, for the 1m humanoid robot and also for some custom projects.

Having so much objects to slice we wanted a faster solution as replicatorG, using python is not so fast...

Image


Searched arround and found this tutorial that explains how to install pypy in a Mac, as I'm using Ubuntu 64 bit I needed to adapt it.

Here are the instructions for Ubuntu (and other linux dists):

first of all you need to install tk-dev otherwise it will not be able to install the tkinter-pypy module, to do this just run this
Code: Select all
sudo apt-get install tk-dev


now just copy paste this commands:

using a 64bit machine
Code: Select all
wget http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux64.tar.bz2
tar xjf pypy-c-jit-latest-linux64.tar.bz2
cd pypy-c-jit-*-linux64
wget http://peak.telecommunity.com/dist/ez_setup.py
./bin/pypy ez_setup.py
wget http://www.foobarsoft.com/wp-content/uploads/2011/10/tkinter-pypy-0.1-for-8.5.zip
unzip tkinter-pypy-0.1-for-8.5.zip
cd tkinter-pypy-0.1-for-8.5
../bin/pypy ./setup.py install
cd ../../
mv pypy-c-jit-*-linux64 pypy


using a 32bit machine
Code: Select all
wget http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux.tar.bz2
tar xjf pypy-c-jit-latest-linux.tar.bz2
cd pypy-c-jit-*-linux
wget http://peak.telecommunity.com/dist/ez_setup.py
./bin/pypy ez_setup.py
wget http://www.foobarsoft.com/wp-content/uploads/2011/10/tkinter-pypy-0.1-for-8.5.zip
unzip tkinter-pypy-0.1-for-8.5.zip
cd tkinter-pypy-0.1-for-8.5
../bin/pypy ./setup.py install
cd ../../
mv pypy-c-jit-*-linux pypy


Now in ReplicatorG go to the ReplicatorG Menu -> Preferences -> Advanced -> Select Python Interpretor...

Select the 'bin/pypy' file it's inside the pypy folder that you just downloaded.

Slice fast! No need to restart ReplicatorG.

In my laptop the sample 3D_Knot.stl took 1min29sec with pypy and 3min14sec with python2 so it reduced the time to less than half :)

Cheers,
Nuno
Hi,

Here at robosavvy we are using the Replicator2 to make some parts for your 3D printed humanoid robot, for the 1m humanoid robot and also for some custom projects.

Having so much objects to slice we wanted a faster solution as replicatorG, using python is not so fast...

Image


Searched arround and found this tutorial that explains how to install pypy in a Mac, as I'm using Ubuntu 64 bit I needed to adapt it.

Here are the instructions for Ubuntu (and other linux dists):

first of all you need to install tk-dev otherwise it will not be able to install the tkinter-pypy module, to do this just run this
Code: Select all
sudo apt-get install tk-dev


now just copy paste this commands:

using a 64bit machine
Code: Select all
wget http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux64.tar.bz2
tar xjf pypy-c-jit-latest-linux64.tar.bz2
cd pypy-c-jit-*-linux64
wget http://peak.telecommunity.com/dist/ez_setup.py
./bin/pypy ez_setup.py
wget http://www.foobarsoft.com/wp-content/uploads/2011/10/tkinter-pypy-0.1-for-8.5.zip
unzip tkinter-pypy-0.1-for-8.5.zip
cd tkinter-pypy-0.1-for-8.5
../bin/pypy ./setup.py install
cd ../../
mv pypy-c-jit-*-linux64 pypy


using a 32bit machine
Code: Select all
wget http://buildbot.pypy.org/nightly/trunk/pypy-c-jit-latest-linux.tar.bz2
tar xjf pypy-c-jit-latest-linux.tar.bz2
cd pypy-c-jit-*-linux
wget http://peak.telecommunity.com/dist/ez_setup.py
./bin/pypy ez_setup.py
wget http://www.foobarsoft.com/wp-content/uploads/2011/10/tkinter-pypy-0.1-for-8.5.zip
unzip tkinter-pypy-0.1-for-8.5.zip
cd tkinter-pypy-0.1-for-8.5
../bin/pypy ./setup.py install
cd ../../
mv pypy-c-jit-*-linux pypy


Now in ReplicatorG go to the ReplicatorG Menu -> Preferences -> Advanced -> Select Python Interpretor...

Select the 'bin/pypy' file it's inside the pypy folder that you just downloaded.

Slice fast! No need to restart ReplicatorG.

In my laptop the sample 3D_Knot.stl took 1min29sec with pypy and 3min14sec with python2 so it reduced the time to less than half :)

Cheers,
Nuno
nunogato offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 86
Joined: Mon Mar 15, 2010 3:48 pm

1 postPage 1 of 1
1 postPage 1 of 1