From d730543de4df9c83e33245e95c1d71f3ac31c586 Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Mon, 24 Oct 2022 16:35:33 -0400 Subject: [PATCH] Added a simple docker dev environment --- dev_requirements.in | 5 +++ dev_requirements.txt | 79 ++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yaml | 0 requirements.in | 0 src/stuff.py | 1 + tasks.py | 9 +++++ 6 files changed, 94 insertions(+) create mode 100644 dev_requirements.in create mode 100644 dev_requirements.txt create mode 100644 docker-compose.yaml create mode 100644 requirements.in create mode 100644 src/stuff.py create mode 100644 tasks.py diff --git a/dev_requirements.in b/dev_requirements.in new file mode 100644 index 0000000..240f739 --- /dev/null +++ b/dev_requirements.in @@ -0,0 +1,5 @@ +black==22.10.0 +invoke==1.7.3 +pip-tools==6.9.0 +pre-commit==2.20.0 +pylint==2.15.4 \ No newline at end of file diff --git a/dev_requirements.txt b/dev_requirements.txt new file mode 100644 index 0000000..7f14b7d --- /dev/null +++ b/dev_requirements.txt @@ -0,0 +1,79 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile dev_requirements.in +# +astroid==2.12.12 + # via pylint +black==22.10.0 + # via -r dev_requirements.in +build==0.8.0 + # via pip-tools +cfgv==3.3.1 + # via pre-commit +click==8.1.3 + # via + # black + # pip-tools +dill==0.3.5.1 + # via pylint +distlib==0.3.6 + # via virtualenv +filelock==3.8.0 + # via virtualenv +identify==2.5.6 + # via pre-commit +invoke==1.7.3 + # via -r dev_requirements.in +isort==5.10.1 + # via pylint +lazy-object-proxy==1.7.1 + # via astroid +mccabe==0.7.0 + # via pylint +mypy-extensions==0.4.3 + # via black +nodeenv==1.7.0 + # via pre-commit +packaging==21.3 + # via build +pathspec==0.10.1 + # via black +pep517==0.13.0 + # via build +pip-tools==6.9.0 + # via -r dev_requirements.in +platformdirs==2.5.2 + # via + # black + # pylint + # virtualenv +pre-commit==2.20.0 + # via -r dev_requirements.in +pylint==2.15.4 + # via -r dev_requirements.in +pyparsing==3.0.9 + # via packaging +pyyaml==6.0 + # via pre-commit +toml==0.10.2 + # via pre-commit +tomli==2.0.1 + # via + # black + # build + # pep517 + # pylint +tomlkit==0.11.5 + # via pylint +virtualenv==20.16.5 + # via pre-commit +wheel==0.37.1 + # via pip-tools +wrapt==1.14.1 + # via astroid + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e69de29 diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..e69de29 diff --git a/src/stuff.py b/src/stuff.py new file mode 100644 index 0000000..1c09e17 --- /dev/null +++ b/src/stuff.py @@ -0,0 +1 @@ +print("Stuff file") \ No newline at end of file diff --git a/tasks.py b/tasks.py new file mode 100644 index 0000000..3a079e7 --- /dev/null +++ b/tasks.py @@ -0,0 +1,9 @@ +from invoke import task + +@task +def start_dev(c): + """Starts the """ + print("Starting the developer environment...") + # c.run("docker-compose -f docker-compose.yml up -d", pty=True)) + c.run("xhost local:root") + c.run("docker run --privileged -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule='c 189:* rmw' -e DISPLAY=$DISPLAY -v $(pwd)/src/:/code -v /tmp/.X11-unix:/tmp/.X11-unix --network host --rm -i -t luxonis/depthai:latest bash", pty=True) \ No newline at end of file