Tuesday, August 16, 2011

Making self-contained Unix programs with CDE



In the old days you could statically link your program and run it on another Unix station without worrying about dependencies. Unfortunately static linking no longer works, so you need to make sure that your target platform has the right libraries.

For instance, in order to get Matlab compiled code running on a server, you have to copy over libraries and set environment variables as specified in Matlab's guide, followed by some investigative work to take care of dependencies and version conflicts not covered by Mathworks documentation.

Another example is when if you want to create a self-contained Scipy/Python environment that you could just copy over and use without needing to run configure and make.

For both cases Philip Guo's CDE tool comes helpful. It analyzes your program to find dependencies and makes a package with all the dependencies included. Then it runs the program through a kind of lightweight virtualization, intercepting program calls to trick it into thinking it's running in the original environment.

For instance, here's how you could make a self-contained environment for Python and Scipy:


cd /temp
git clone git://github.com/pgbovine/CDE.git
cd CDE
make
cd ..
CDE/cde python -c "from scipy import *; print zeros(15)"
tar -cf package.tar cde-package


This makes a 26 MB file that includes that all files that were read during execution of that command.
Now you can move it to another machine that doesn't have scipy, prepare the environment and try it out as follows

tar -xf package.tar
cd cde-package/cde-root/temp
../../cde-exec python -c "from scipy import *; print ones(15)"


This will work even if machine doesn't have Python installed, or has the wrong version of shared libraries installed, because cde-exec is reproducing the environment of the original machine. It works for anything that doesn't need files other than the ones accessed during package creation.

For instance, you could start an interactive Python session and run some SciPy examples like this


cde cde-package/cde-root
../cde-exec python
>>> from scipy import *
>>> ....


You could give your containerized program access to host system by creating symlink to the outside in cde-root

37 comments:

Unknown said...

nice blog
android training in bangalore
ios training in bangalore
machine learning online training

Unknown said...

sap bi interview questions
hive interview questions
seo interview questions
as400 interview questions
wordpress interview questions
accounting interview questions
basic accounting and financial interview questions

Anonymous said...

nice blogs about financial accounting at The Basic Financial training in bangalore

Diya shree said...

Thank you for sharing your article. Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums.

best openstack training in chennai | openstack course fees in chennai | openstack certification in chennai | openstack training in chennai velachery

katetech said...

Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
internship companies in kphb
apply for internship in kphb

Anonymous said...

Machine Learning Interview Questions and Answers
Artificial Intelligence Interview Questions and Answers

Praylin S said...

It's great to come across a blog once in a while that's not the same outdated material. Really glad that I came across your post. Keep us updated.
Unix Training in Chennai
Unix Shell Scripting Training in Chennai
Embedded System Course Chennai
Embedded Training in Chennai
LINUX Training in Chennai
LINUX Course in Chennai
Unix Training in Porur
Unix Training in OMR

basha said...

Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
oracle fusion financials classroom training
Workday HCM Online Training
Oracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion HCM Classroom Training

remo said...

THANKS FOR THE INFORMATION....
Digital Marketing Internship Program in BangaloreDigital Marketing Internship Program in Bangalore

draj said...


Excellent machine learning blog,thanks for sharing...
Seo Internship in Bangalore
Smo Internship in Bangalore
Digital Marketing Internship Program in Bangalore

Anonymous said...


Hello, o you know that the best way to boost your brain is
visiting or contacting us


https://weiiitrading.com/our-products/moonrock-carts/buy-empty-moonrock-clear-vape-cartridges-blue-carts-dr-zodiak-atomizers-with-flavor-box-packaging/

https://weiiitrading.com/our-products/heavy-hitters-carts/buy-wholesale-new-heavy-hitter-vape-cartridges-1-0ml-ceramic-coil-empty-tank-carts-510-thread-thick-oil-atomizer/

https://weiiitrading.com/our-products/juul-carts/buy-hot-empty-ceramic-pod-disassembled-cartridges-0-7ml-1-0ml-vape-pod-carts-for-vape-juul-vape-pen-start-kit-top-quality/

https://weiiitrading.com/our-products/mario-carts/buy-peaches-and-dream/

https://weiiitrading.com/our-products/heavy-hitters-carts/buy-bubba-kush-cartridge-2-2g/

https://weiiitrading.com/our-products/mario-carts/buy-thin-mint-cookies/



Pila Brass Knuckles Online for sale online,

where to buy Buy Pila Brass Knuckles Online

buy valley online cartridge

buy space candy online

buy cannabis syrup online

buy botox online

cannabis bread

uk chese

47 dank vapewhite fire og

buy moonrock



Email Us

Contact: +1 619-537-6734

Anonymous said...


Hello, o you know that the best way to boost your brain is
visiting or contacting us


https://weiiitrading.com/our-products/moonrock-carts/buy-empty-moonrock-clear-vape-cartridges-blue-carts-dr-zodiak-atomizers-with-flavor-box-packaging/

https://weiiitrading.com/our-products/heavy-hitters-carts/buy-wholesale-new-heavy-hitter-vape-cartridges-1-0ml-ceramic-coil-empty-tank-carts-510-thread-thick-oil-atomizer/

https://weiiitrading.com/our-products/juul-carts/buy-hot-empty-ceramic-pod-disassembled-cartridges-0-7ml-1-0ml-vape-pod-carts-for-vape-juul-vape-pen-start-kit-top-quality/

https://weiiitrading.com/our-products/mario-carts/buy-peaches-and-dream/

https://weiiitrading.com/our-products/heavy-hitters-carts/buy-bubba-kush-cartridge-2-2g/

https://weiiitrading.com/our-products/mario-carts/buy-thin-mint-cookies/



Pila Brass Knuckles Online for sale online,

where to buy Buy Pila Brass Knuckles Online

buy valley online cartridge

buy space candy online

buy cannabis syrup online

buy botox online

cannabis bread

uk chese

47 dank vapewhite fire og

buy moonrock



Email Us

Contact: +1 619-537-6734

75 Farm Cannabis Specialists MARLEY NATURAL said...

we have a wide range of medical signatures
just take a sec and visit us with or without prescription, and you shall be served accordingly
Buy Promethazine codeine online
Order Biotropin Online
Order Adderrall Online Without Prescription
Buy sibutramine online
buy Nembutal sodium online


buy dexedrine online
buy vyvanse online
buy methadone online
buy Nembutal sodium online
buy opana online
buy cheap ambien online
buy max performer sex pills
buy anavar online

buy amytal sodium online
buy cheap ambien
buy ephedrine crystals
fentanyl actiq
fentanyl patches


buy amytal sodium online
changa
mdma pills
buy changa dmt online
buy morning glory seeds
buy ibogaine
Ayahuasca
buy mescaline
buy Penis envy
Penis envy mushrooms
Golden teacher mushrooms
mescaline drug for sale
buy liberty cap mushrooms
liquid lsd
buy lsd liquid
what is dmt
what is lsd
buy albino penis envy
what is penis envy
buy kratom near me
buy kratom powder
buy kratom
buy liquid lsd online
buy dmt online
buy pills online
changa dmt
penis envy mushrooms
lsd for sale
dmt trip
ayahuasca tea
kentucky ayahuasca tea
iboga
ecstacy
molly




Email Us

Wickr: walkerpeac

Techno Globe said...


Really great info you provided here.
Thank You
Machine Learning Training in jaipur
Artificial Intelligence Training in Jaipur

Data Science Course in Bangalore said...

Actually I read it yesterday I looked at most of your posts but I had some ideas about it . This article is probably where I got the most useful information for my research and today I wanted to read it again because it is so well written.
Data Science Course in Bangalore

Srigokul said...

Nice Blog. Thanks for Sharing this useful information...

Data science training in chennai
Data science course in chennai

Data Science Course in Faridabad - 360DigiTMG said...

Truly mind blowing blog went amazed with the subject they have developed the content. These kind of posts really helpful to gain the knowledge of unknown things which surely triggers to motivate and learn the new innovative contents. Hope you deliver the similar successive contents forthcoming as well.

data science in bangalore

Mallela said...

Thanks for posting the best information and the blog is very helpful.data science institutes in hyderabad

Mallela said...

Thanks for posting the best information and the blog is very helpful.artificial intelligence course in hyderabad

trainingcourses said...

I see some amazingly important and kept up to a length of your strength searching for in your on the site

digital marketing courses in hyderabad with placement

Deekshitha said...

Informative blog
ai training in hyderabad

Mallela said...

Thanks for posting the best information and the blog is very helpful.digital marketing institute in hyderabad

Deekshitha said...

Informative blog

best digital marketing institute in hyderabad

buy red bull online said...

buy tramadol online
buy painkillers online
buy nembutal online
oxycodone for sale
buy actavis promethazine online
Buy Hygetropin online

Buy Jintropin Online
 buy guns online

buy Medical Marijuana online
buy Weed online  

Peaceful Euthanasia said...

Whatsapp: +1 (612) 4700-476) # Buy Nembutal Pills online ,

Online Nembutal , Nembutal Oral For Sale , Nembutal Sodium Online . Contact Email : Onlinepharmaceautical@gmail.com
https://alphapharmaceuticalsstore.com/product-category/nembutal/
Pentobarbital Online ,
WhatsApp Contact: +1 (612) 4700-476)

Buy pseudoephedrine,
pseudoephedrine hcl tablets for sale online,
pseudoephedrine tablets for sale ,
50 Mg of Ephedrine,
Decongestant Ephedrine Hydrochloride,
ephedra,
Ephedra Drug,
Ephedra Pills 25 Mg,
Ephedrine 10 Mg,
Ephedrine 30 Mg Amp,
Ephedrine 50mg,
Ephedrine 5Mg,
Ephedrine 8Mg Canada,
Ephedrine ,
Buy Ephedrine for sale ,
Buy Ketamine online ,
20 mg ketamine powder side effects,
Buy Ketamine hydrochloride Online,
Buy Ketamine Online,
buy ketamine powder,
buy ketamine powder online,
how to buy ketamine powder,
how to make ketamine powder,
NEMBUTAL ORAL LIQUID FOR SALE,
Buy Nembutal Pills online,
Buy Nembutal Powder online,
Buy lethal injections,
Buy Nembutal (Pentobarbital) online,
Buy Nembutal (Pentobarbital) pills,
Buy nembutal mexico Our Nembutal (Pentobarbital Sodium),
Buy Nembutal Online,
alpha pharmacy nembutal oral solution,
Buy Nembutal (Pentobarbital) online,
Buy Nembutal (Pentobarbital) pills,
buy nembutal at alpha pharmaceuticals online store,
Buy nembutal mexico Our Nembutal (Pentobarbital Sodium),
Buy Nembutal Online, Buy Nembutal Powder,
Buy Nembutal Powder online, Buy Nembutal Tablets,
Buy Pentobarbital Sodium Online,
Buy Seconal Sodium,
Hong Kong Nembutal,
nembutal,
nembutal oral solution,
nembutal oral solution from alpha pharmacy,
nembutal powder,
Nembutal powder for sale,
Nembutal solution sodium (by injection),
Online Nembutal Pharmacy,
Where to Order Nembutal Online,
Buy Nembutal Online,
how can i order nembutal,
nembutal for sale online,
nembutal oral solution,
nembutal pentobarbital for sale online,
nembutal pentobarbital sodium,
nembutal solution,
Order Nembutal Online,
We sell the best quality nembutal online,
where can i buy nembutal,
where to buy nembutal,
NEMBUTAL ORAL LIQUID FOR SALE,
Nembutal Liquid,
Furanyl Fentanyl Powder,
Nembutal Powder,
Nembutal Injections,
Secobarbital Sodium,
Nembutal Capsules,

https://alphapharmaceuticalsstore.com/product/buy-nembutal-oral-liquid-online/

WhatsApp Contact: +1 (612) 4700-476)

https://alphapharmaceuticalsstore.com/

Contact Email : Onlinepharmaceautical@gmail.com

https://alphapharmaceuticalsstore.com/product/buy-nembutal-pills-online/

https://alphapharmaceuticalsstore.com/product/buy-nembutal-powder-online/

https://alphapharmaceuticalsstore.com/product-category/ketamine/

https://alphapharmaceuticalsstore.com/product/buy-pseudoephedrine-pills-online/

https://alphapharmaceuticalsstore.com/product/buy-ephedrine-for-sale/

Nembutal online

Nembutal online

NEMBUTAL LIQUID

Nembutal online

Nembutal Powder

Nembutal Powder

Buy Ketamine online

PSEUDOEPHEDRINE HCL

Buy Pentobarbital in Mexico, 
Where Can I Buy Nembutal, 
Buy Nembutal Pentobarbital, 
Pentobarbital Online ,
Nembutal Pentobarbital Online ,
Buy Nembutal Pentobarbital Online ,
Buy Pentobarbital online,
Buy Nembutal Online ,
Sodium Suicide ,
Nembutal pentobarbital Sodium ,

trainingcourses said...

I want to say thanks to you. I have bookmark your site for future updates.
business analytics course

Deekshitha said...

Informative blog
best digital marketing institute in hyderabad

Deekshitha said...

Informative blog
ai training in hyderabad

Deekshitha said...

Informative blog
data science course in Nashik

Data Science Course in Faridabad - 360DigiTMG said...

Stupendous blog huge applause to the blogger and hoping you to come up with such an extraordinary content in future. Surely, this post will inspire many aspirants who are very keen in gaining the knowledge. Expecting many more contents with lot more curiosity further.

data science course in faridabad

Deekshitha said...

Informative blog
data analytics courses in hyderabad

Mallela said...

Thanks for posting the best information and the blog is very important.data science course in Lucknow

Deekshitha said...

Informative blog
best digital marketing institute in hyderabad

Deekshitha said...

Informative blog
ai training in hyderabad

Data Science Course in Faridabad - 360DigiTMG said...

Mind-blowing went amazed with the content posted. Containing the information in its unique format with fully loaded valid info, which ultimately grabs the folks to go through its content. Hope you to keep up maintaining the standards in posting the content further too.

Data Science Course in Bangalore

Deekshitha said...

Informative blog
Cloud Computing in hyderabad

Deekshitha said...

Informative blog
data analytics courses in hyderabad