[go: up one dir, main page]

Skip to content

hexfaker/doh

Repository files navigation

doh

Build status Python Version Dependencies Status

Code style: black Pre-commit Semantic Versions License

Docker-based development environments. Think of it like conda envs or virtual envs on steroids.

Features

  • Launch docker containers with strong defaults for interactive usage
    • workdir mounted by default
    • files created inside docker have correct ownership
    • dirs mounted and env vars set can be configured
    • Selected files from home dir can be propagated to fake home inside docker
  • Run ssh server for remote development in containers without image modification, with docker on remote host support
  • Launch jupyter kernels inside docker (either with vscode ssh development or with external jupyter server)

Quick start

  1. Ensure your python is at least 3.8
  2. Install doh:
    • With pipx (preferred, dependencies for cli tools installed with pipx are managed independently):
    pipx install 'git+https://github.com/hexfaker/doh.git'
    • To your existing virtualenv (your dependencies may conflict with doh's):
    pip install 'git+https://github.com/hexfaker/doh.git'
  3. Cd into your project dir:
mkdir -p my-simple-torch-project && cd my-simple-torch-project
  1. Create Dockerfile in it
# my-simple-torch-project/Dockerfile
FROM pytorch/pytorch:1.7.0-cuda11.0-cudnn8-devel
  1. Create to-go doh config
doh init
  1. Enjoy
doh sh # Spawns a shell inside container
doh ssh # Starts ssh server inside container, follow instructions to connect
doh kernel-install # Writes some configs for jupyterlab(notebook) that allows to run kernel inside container. Requires python and ipython to be present inside container
doh exec # For advanced usage, runs a single command inside container

🛡 License

License

This project is licensed under the terms of the GNU GPL v3.0 license. See LICENSE for more details.

📃 Citation

@misc{doh,
  author = {Vsevolod Poletaev},
  title = {Docker-based development environments},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/hexfaker/doh}}
}

Credits

This project was generated with python-package-template.