From c69d571696aa090a2cc6b52bc27be341ddf2c8b2 Mon Sep 17 00:00:00 2001 From: KIM Moonsoo Date: Fri, 26 May 2023 13:55:49 +0900 Subject: [PATCH] Move Docker section to docs/guides According to review, docker section has been moved to sepreated document --- README.md | 43 +------------------------------------------ docs/guides/DOCKER.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 docs/guides/DOCKER.md diff --git a/README.md b/README.md index 96b57b4..f40ff29 100755 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ cd ioter cd ioter ./script/run ``` +Or you can use [**Docker image**](./docs/guides/DOCKER.md) ## How to onboarding (with SmartThings App) ![onbooadingGuide 1](https://github.com/Samsung/ioter/assets/131251075/200fd452-549a-4db8-ad7d-bfbd1fef5ebf) @@ -99,45 +100,3 @@ https://github.com/project-chip/connectedhomeip/issues/6347 For Ioter contribution, see our [Contributing Guidelines](https://github.com/Samsung/ioter/blob/main/CONTRIBUTING.md) for more information. We welcome your contribution at any time. - - -## Docker image support -You can use a Docker image that 'ioter' environment is prepared - -It confirmed that is working on below host OS: -- Ubuntu 20.04 - -It also confirmed that there are unsupported host OS: -- Ubuntu 16.04 -- macOS - -### How to start -Threre are things to be needed to prepare on host side -1. Set xhost to connect to X server and use X11 -> $ xhost +local:root - -2. Turn off Bluetooth service -> systemctl stop Bluetooth - -or - -> service bluetooth stop - -### Run docker container -You can run with below command -``` -sudo docker run --rm -it -e DISPLAY=$DISPLAY \ --v [HOST_IOTER_PATH]:/home/iot/ioter \ --v /tmp/.X11-unix:/tmp/.X11-unix \ --v "$HOME/.Xauthority:/root/.Xauthority:ro" \ ---device=[DEVICE_NODE_PATH] \ --v /dev:/dev \ ---privileged \ ---net=host \ ---cap-add=NET_ADMIN --cap-add=SYS_ADMIN \ -docker.io/spdkimo/ioter:[VERSION] \ -python3 ioter/src/main.py -``` -- HOST_IOTER_PATH: Path of ioter repository on host pc -- DEVICE_NODE_PATH: Path of device node. For example, most devices starts with 'dev/ttyACM' -- VERSION: ioter image version. You can find details from https://hub.docker/repository/docker/spdkimo/ioter/ diff --git a/docs/guides/DOCKER.md b/docs/guides/DOCKER.md new file mode 100644 index 0000000..3e22ff2 --- /dev/null +++ b/docs/guides/DOCKER.md @@ -0,0 +1,41 @@ +# Docker image support +You can use a Docker image that 'ioter' environment is prepared. + +It confirmed that is working on below host OS: +- Ubuntu 20.04 + +It also confirmed that there are unsupported host OS: +- Ubuntu 16.04 +- macOS +- Any OS running on ARM platform such as Raspberry Pi + +## How to start +There are things to be needed to prepare on host side. +1. Set xhost to connect to X server and use X11 +> $ xhost +local:root + +2. Turn off Bluetooth service +> systemctl stop Bluetooth + +or + +> service bluetooth stop + +## Run docker container +You can run with below command. +``` +sudo docker run --rm -it -e DISPLAY=$DISPLAY \ +-v [HOST_IOTER_PATH]:/home/iot/ioter \ +-v /tmp/.X11-unix:/tmp/.X11-unix \ +-v "$HOME/.Xauthority:/root/.Xauthority:ro" \ +--device=[DEVICE_NODE_PATH] \ +-v /dev:/dev \ +--privileged \ +--net=host \ +--cap-add=NET_ADMIN --cap-add=SYS_ADMIN \ +docker.io/spdkimo/ioter:[VERSION] \ +python3 ioter/src/main.py +``` +- HOST_IOTER_PATH: Path of ioter repository on host pc +- DEVICE_NODE_PATH: Path of device node. For example, most devices starts with 'dev/ttyACM' +- VERSION: ioter image version. You can find details from https://hub.docker/repository/docker/spdkimo/ioter/