Hacker News new | past | comments | ask | show | jobs | submit login

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




We'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#issueco...

However, if you're a hardcore vim guy then I doubt these IDEs are gonna satiate your current flow.


I 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


What 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.


Funny 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#issueco....

Once that's implemented, oh man, development nirvana.


yup. happy pycharm and docker user here. even have it working with debugging and breakpoints.


Ever heard about bind mounting? My current docker image for a Flask app doesn't even contains my code.


Are you mounting your virtualenv into the container somehow? How does your editor see the code/docs for your pip dependencies?


I 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.


Emacs 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.


what 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


C-c C-p will start an inferior python shell in the container, for instance.


Lots 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.


See 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: