From 2e43f2e4f6bf27ec2a218f73f8dc29cf88b13c95 Mon Sep 17 00:00:00 2001 From: Rooholla-KhorramBakht Date: Tue, 16 Apr 2024 16:40:27 -0400 Subject: [PATCH] devcontainer config files added --- .devcontainer/Dockerfile | 31 +++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 13 +++++++++++++ .devcontainer/docker-compose.yaml | 17 +++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..491b061 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,31 @@ +FROM ros:foxy +ENV DEBIAN_FRONTEND=noninteractive +SHELL ["/bin/bash", "-c"] +RUN apt-get update && apt-get install -y -qq --no-install-recommends \ + libglvnd-dev \ + libgl1-mesa-dev \ + libegl1-mesa-dev \ + libgles2-mesa-dev \ + libxext6 \ + libx11-6 \ + freeglut3-dev \ + git \ + python3-pip \ + ros-foxy-rmw-cyclonedds-cpp ros-foxy-rosidl-generator-dds-idl \ + libyaml-cpp-dev \ + ros-foxy-xacro \ + libboost-all-dev\ + build-essential \ + cmake \ + && rm -rf /var/lib/apt/lists/* + + +RUN pip3 install mujoco pin matplotlib + +RUN cd / && git clone https://github.com/unitreerobotics/unitree_ros2 && cd /unitree_ros2/cyclonedds_ws/src && \ +git clone https://github.com/ros2/rmw_cyclonedds -b foxy && git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x &&\ +cd .. && colcon build --packages-select cyclonedds && source /opt/ros/foxy/setup.bash && colcon build + +# Env vars for the nvidia-container-runtime. +ENV NVIDIA_VISIBLE_DEVICES all +ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..14e7378 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,13 @@ +// https://containers.dev/implementors/json_reference/ +{ + "name": "go2py", + "dockerComposeFile": "docker-compose.yaml", + "workspaceFolder": "/home/Go2Py", + "service": "go2py-dev", + "remoteUser": "root", + "customizations": { + "vscode": { + "extensions": ["dbaeumer.vscode-eslint"] + } + } +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml new file mode 100644 index 0000000..54d71e4 --- /dev/null +++ b/.devcontainer/docker-compose.yaml @@ -0,0 +1,17 @@ +version: "3.9" +services: + go2py-dev: + build: . + container_name: go2py-dev + network_mode: host + privileged: true + command: bash + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix + - ..:/home/Go2Py + environment: + - DISPLAY=${DISPLAY} + - QT_X11_NO_MITSHM=1 + runtime: nvidia + stdin_open: true + tty: true \ No newline at end of file