{"id":25439414,"url":"https://github.com/brthor/pycharm-docker-interpreter-local-template","last_synced_at":"2026-07-07T00:31:21.172Z","repository":{"id":231780582,"uuid":"782714431","full_name":"brthor/pycharm-docker-interpreter-local-template","owner":"brthor","description":"A project template for PyCharm Professional that uses an interpreter inside a docker container.","archived":false,"fork":false,"pushed_at":"2024-04-05T21:46:23.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T09:43:26.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brthor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-05T21:38:36.000Z","updated_at":"2024-04-05T21:39:17.000Z","dependencies_parsed_at":"2024-04-05T22:46:05.501Z","dependency_job_id":null,"html_url":"https://github.com/brthor/pycharm-docker-interpreter-local-template","commit_stats":null,"previous_names":["brthor/pycharm-docker-interpreter-local-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brthor/pycharm-docker-interpreter-local-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fpycharm-docker-interpreter-local-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fpycharm-docker-interpreter-local-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fpycharm-docker-interpreter-local-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fpycharm-docker-interpreter-local-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brthor","download_url":"https://codeload.github.com/brthor/pycharm-docker-interpreter-local-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fpycharm-docker-interpreter-local-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35210429,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-17T10:19:24.837Z","updated_at":"2026-07-07T00:31:21.050Z","avatar_url":"https://github.com/brthor.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# PyCharm Local Docker Interpreter Project Template\n\nThis template can be copied to create a project that uses docker for its local interpreter, avoiding the need for \nendless `venv` directories and installing packages to your local dev system.\n\n**Use of this repo requires PyCharm Professional** because the community version does not support SSH interpreters.\n\nWith this template you get full debugging support and PyCharm behaves as if you were using a local `venv` interpreter.\n\n### Dev Setup\n\n1. Go to `./dev/vars.sh` and adjust the `LOCAL_DOCKER_SSH_PORT` variable so that this project's ssh port does not \n   conflict with other projects you may have setup previously.\n2. RUN `./dev/sshd/create-keys.sh` to create the local ssh keys. You should store these in git for all members of \n   the project.\n3. Run `./dev/d-pyc.sh` to build and start the local docker interpreter.\n4. Configure pycharm to use this ssh interpreter:\n\n    1. Create an SSH configuration in Pycharm.\n       - Open: Preferences (cmd/ctrl+,) -\u003e Tools -\u003e SSH Configurations\n       - Add a new SSH Configuration and set the settings:\n         - Host = localhost\n         - Port = 2222 (or whatever you set LOCAL_DOCKER_SSH_PORT to)\n         - User = root\n         - Authentication Type = Key Pair\n         - Private key file: browse to this repo `./dev/sshd/dev-sshd.pem`\n         - Ensure Unchecked: Visible for only this project\n         - Press the \"Test Connection\" button and it should succeed.\n\n           ![alt text](./dev/docs/pycharm-interpreter-setup-01.png \"Title\")\n\n    2. Create an SSH interpreter in Pycharm using the SSH configuration.\n       - Open: Preferences (cmd/ctrl+,) -\u003e Project -\u003e Project Interpreter\n       - Click the cog icon on the right and press \"Add\".\n       - Select \"SSH Interpreter\" and configure it to use the existing SSH configuration we just created. Press Next.\n       \n         ![alt text](./dev/docs/pycharm-interpreter-setup-02.png \"Title\")\n       \n       - Change the remote path mapping to `/app` and uncheck automatic uploads. Press Finish.\n       \n         ![alt text](./dev/docs/pycharm-interpreter-setup-03.png \"Title\")\n       \n    3. The interpreter setup is complete.\n   \n5. Whenever you need new pip packages:\n   1. Add the package to the `requirements.txt` file at the project root.\n   2. Re-run `./dev/d-pyc.sh` and it will rebuild the environment with the new packages.\n      - Alternatively, Pycharm may prompt you to install the package automatically, this is better for usual work flow.\n   3. If you want updated autocomplete, restart Pycharm. (Autocomplete should update on its own if Pycharm installed \n      the package for you.)\n\n\n### Dev scripts\n\n`dev/d-exec.sh`\n\nThis script is used to execute arbitrary commands inside a separate dev environment container. For example \n`./dev/d-exec.sh python3 -m main` would execute the script `main.py` located at the repo root.\n\nIn most cases you would instead use a PyCharm run configuration to run your code inside the main interpreter container. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrthor%2Fpycharm-docker-interpreter-local-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrthor%2Fpycharm-docker-interpreter-local-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrthor%2Fpycharm-docker-interpreter-local-template/lists"}