3 ms·
My problem with using Docker (only) is that it doesn't translate well to editors. Like, using jedi-vim[1] with a virtualenv constructed by a Docker container do
by Spiritus 9y ago
My problem with using Docker (only) is that it doesn't translate well to editors. Like, using jedi-vim[1] with a virtualenv constructed by a Docker container doesn't work at all. Unless I actually run vim itself inside said container.
So unless your dependences build on macOS (like in my case), everything goes out the door.
[1] https://github.com/davidhalter/jedi-vim https://github.com/davidhalter/jedi-vim
- AlexCoventry 9y agoEmacs has pretty nice integrations with inferior docker processes. I'm getting them via spacemacs, so I'm not sure what specific package provides it, but I assume it's elpy.
- cat199 9y agowhat kinds of interactions? (like: what operations, etc) using elpy here with a native install and can use e.g. tramp for remote editing/python sessions in most cases (even across machines), but determining docker mount points to edit in-machine not so much.. I suppose one can simply map a local code directory into a runtime environment, but this also makes e.g. interacting with an in-container interpreter a bit bothersome (not so bad actually, but have to set a separate interpreter path to something like 'docker exec -it ctid python' would like to track this down I suppose
- AlexCoventry 9y agoC-c C-p will start an inferior python shell in the container, for instance.
- _drFaust 9y agoWe've got about 30+ backends in python all wrapped in docker containers. Majority of the team was pure vim before I joined and they're slowly converting to pycharm after seeing how nicely you can setup a remote interpreter against a docker container. And it has vim bindings so you don't have to re-learn new hotkeys. I've also been following this VS Code issue on adding remote docker support for python https://github.com/Microsoft/vscode-python/issues/79#issuecomment-366000230 https://github.com/Microsoft/vscode-python/issues/79#issueco... However, if you're a hardcore vim guy then I doubt these IDEs are gonna satiate your current flow.
- nickjj 9y agoFunny you mentioned that issue. I'm eagerly awaiting that feature too. I commented in the issue a few weeks ago: https://github.com/Microsoft/vscode-python/issues/79#issuecomment-362836925 https://github.com/Microsoft/vscode-python/issues/79#issueco.... Once that's implemented, oh man, development nirvana.
- wirrbel 9y agoI remember, on my laptop with pycharm and docker (and the virtual machine docker lived in), the RAM usage was just excessive. I am by no means a minimalist, but data-science stuff was barely impossible with 16 GB RAM. Also, I strongly dislike PyCharm. I am a vim guy by heart, but I am generally not against IDEs. VS Code is okayish. For C++ development, I really loved Visual Studio. But PyCharm just feels wrong, bloated, slow and baroque
- jsmeaton 9y agoWhat I do is create the virtualenv locally that docker would also create, and point my editor to the local virtualenv. It gives me all of the intellisense locally. I still need to debug within the container/shell for the moment but I'm hoping there's a pathway coming for vscode that pycharm already has.
- sheraz 9y agoyup. happy pycharm and docker user here. even have it working with debugging and breakpoints.
- Walkman 9y agoEver heard about bind mounting? My current docker image for a Flask app doesn't even contains my code.
- maccam94 9y agoAre you mounting your virtualenv into the container somehow? How does your editor see the code/docs for your pip dependencies?
- yetanother1980 9y agoI have not tried it but I imagine this would work fine. Project Project/venv Project/src And then have the whole project as a volume. Then your editor can see the same files as you have in the container.
- mikewhy 9y agoLots of people mentioning you can maybe debug a remote process, but none suggesting what to do about completions. Maybe you can use bind mounts, but I'm not sure how well that works in practice, or with eg a package with a native component.
- jsmeaton 9y agoSee my comment a few above. Setup a virtualenv locally that your dev env points to for completions, but actually run the app within the container (with its own virtualenv). Docker is great for dependencies like databases and queues. I find it totally unnecessary for developing python.