What am I missing?
What am I missing?
Can docker easily access the host filesystem or do you have to copy all your data into each docker env?
Can I access my GPU for doing CUDA/OpenGL/OpenCL things from withing docker?
Does docker play nicely with GUI apps?
Calling into a running docker env from an external program (when you are using an app that has python as scripting or plug-in language) doesn't work as far as I know.
The overhead of setting up, tearing down an switching between several Docker envs seems to higher than with tools like virtualenvwrapper or conda.
Now there may be workarounds for these (and all the other) problems but on the surface they don't seem easier than virtualenv.
I was mainly thinking in the context of developing webapps.
I'm interested in this enough that I intend to investigate and answer all your questions, perhaps in a blog post. I don't know enough right now to answer with certainty. However:
- it will currently only work well if you are developing on Linux. MacOS isn't bad but requires vagrant/virtualbox.
- I suspect switching between Docker envs may be faster, easier and cleaner than virtualenv which is why I suggested it.
- There is definitely support for sharing data.
Yes, docker can easily access host's filesystem with volumes.
Yes you can access you GPU. I am using docker for mining.
Yes Docker plays nicely with GUI apps, there are plenty of GUI usecases with docker (docker desktop, firefox, etc..)
You can do anything you want within a python app and docker. There is a docker-py library that gives access to all docker features.
You can take a look at this: https://github.com/jpetazzo/stevedore in order to easily switch envs.
Thankfully I've never ran into this issue.