From 1a09c9c54ca628ea288d2e8791422699334bb6cc Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Fri, 10 Apr 2020 01:38:38 -0400 Subject: [PATCH] Docker Environment Setup - Add docker-compose with python-dev container that mounts all folders - Add Dockerfile with libraries for point clouds, natural language processing, and CV - Add .env file for IP Address used by X Forwarding --- src/.env | 3 +++ src/Dockerfile | 22 ++++++++++++++++++++++ src/docker-compose.yml | 25 +++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 src/.env create mode 100644 src/Dockerfile create mode 100644 src/docker-compose.yml diff --git a/src/.env b/src/.env new file mode 100644 index 0000000..41f3f94 --- /dev/null +++ b/src/.env @@ -0,0 +1,3 @@ +# .env for docker-compose + +IP_ADDRESS=192.168.1.14 \ No newline at end of file diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 0000000..b93beda --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,22 @@ +FROM python:3 + +RUN apt-get update && \ + apt-get install -y \ + build-essential \ + python-opencv \ + libpcl-dev + +RUN pip install -U pip && \ + pip install -U \ + cython \ + numpy \ + scipy \ + matplotlib \ + nltk \ + setuptools \ + pylint + +RUN pip install -U \ + python-pcl + +CMD ["/bin/bash"] diff --git a/src/docker-compose.yml b/src/docker-compose.yml new file mode 100644 index 0000000..080e6d8 --- /dev/null +++ b/src/docker-compose.yml @@ -0,0 +1,25 @@ +# Docker Compose + +# docker-compose.yml format version +version: '3' + +# Define services +services: + # Python Development Container + python-dev: + # Use Dockerfile in current folder + build: . + # Mount ros-dev folder on host to app folder in container + volumes: + - ./control:/app/control + - ./dataset:/app/dataset + - ./localization:/app/localization + - ./planning:/app/planning + - ./semantic:/app/semantic + - ./visualization:/app/visualization + # Set DISPLAY variable and network mode for GUIs + environment: + - DISPLAY=${IP_ADDRESS}:0.0 + network_mode: "host" + # Set working directory in container to app folder + working_dir: /app