![]() ![]() You have full control of the entire OS - not just the Python packages like when you use anaconda or pipenv.In this post I will write my workflow for using Pycharm and Docker (docker-compose) together. Note that you should adjust the version numbers according to the version you have installed on your own machine (the left part) and the Docker container (right part).įinally, note that in this case, the user account created in Docker image is developer, so be sure to adjust that too.Ĭheck out the full Dockerfile for more details.Note: This guide requires you to have both Linux (I am using Ubuntu 18.04), P圜harm Professional (to support Docker), Docker and Nvidia-Docker (for GPU images). This is not strictly needed, but useful if you have plugins (like IdeaVim), themes, or any custom settings that you don’t want to set manually. The final one maps the P圜harm settings directory. The first two basically exposes your xhost so that the Docker container can render the display by reading and writing through the X11 socket. -v ~/.P圜harmCE2019.2:/home/developer/.P圜harmCE2019.2 (Optional, but nice to have to match your local P圜harm settings and plugins).The most interesting flags that are related to P圜harm are: % docker run -it -rm -name sparkdev -e DISPLAY = $ -v ` pwd `:/home/developer/ -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/.P圜harmCE2019.2:/home/developer/.P圜harmCE2019.2 -p 4040:4040 benjamintanweihao/sparkdev This is the usual docker build (remember the dot at the end!): In practice, this can be anything you want, or nothing at all. For example, if you’re using Intellij then you shouldn’t be using /opt/pycharm.Īfter the P圜harm dependencies are set up, the final command is meant to start the Spark server. You can always change pycharm_source to point to any Jet Brains IDE you like, though you’ll have to adjust the paths yourself. RUN curl -fsSL $pycharm_source -o /opt/pycharm/installer.tgz \
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |