diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..44935c5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM i386/ubuntu:14.04 + +RUN apt-get update && \ + apt-get install -y python python-numpy python-opencv && \ + apt-get clean -y +ADD pynaoqi-python2.7-2.1.4.13-linux32.tar.gz /opt +ENV PYTHONPATH="${PYTHONPATH}:/opt/pynaoqi-python2.7-2.1.4.13-linux32" diff --git a/README.md b/README.md index cea67f6..55b9fc0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Prerequisites -1. (L)ubuntu 14.04 +1. (L)ubuntu 14.04 (if not using Docker) 2. Git installed: ```sh @@ -54,6 +54,27 @@ robot. 3. ssh to the robot, go to the directory containing the `pykick` folder and run `python -m pykick` (the same as on the laptop). +### To run code with the Docker + +*Note:* For this method to work, you don't need a Ubuntu 14.04, any x86 system with +Docker installed will probably work. + +1. Download the `pynaoqi-python2.7-2.1.4.13-linux32.tar.gz` from somewhere and + put it into the project directory, and `cd` to the project directory. +2. Run `docker build -t kick-it .` +3. Then use Docker to run the stuff, for example + +``` +docker run --rm -it \ + -v /path/to/project:/workspace \ + -w /workspace \ + --user "$(id -u):$(id -g)" \ + kick-it python -m pykick.colorpicker --help +``` + +The scripts with GUI (like `colorpicker`) can be made to work with some extra +flags. + ## What's inside? * `__main__.py` - The script containing the state machine. Read this to figure