Skip to content

Commit

Permalink
Updated devcontainer configurations to use latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-palmer committed Oct 12, 2023
1 parent 5c662c2 commit b435bf3
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 38 deletions.
27 changes: 27 additions & 0 deletions .devcontainer/nouveau/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ghcr.io/robotic-decision-making-lab/blue:rolling-desktop

# Install ROS dependencies
# This is done in a previous stage, but we include it again here in case anyone wants to
# add new dependencies during development
ENV USERNAME=blue
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
WORKDIR $USER_WORKSPACE

COPY --chown=$USER_UID:$USER_GID . src/blue
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install debugging/linting Python packages
COPY --chown=$USER_UID:$USER_GID requirements-dev.txt .
RUN python3 -m pip install -r requirements-dev.txt \
&& rm -rf requirements-dev.txt

# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
ENV PYTHONWARNINGS="ignore"

21 changes: 6 additions & 15 deletions .devcontainer/nouveau/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"dockerFile": "../../.docker/Dockerfile",
"name": "Blue Nouveau Dev Container",
"dockerFile": "Dockerfile",
"context": "../..",
"build": {
"args": {
"WORKSPACE": "${containerWorkspaceFolder}",
"ROS_DISTRO": "rolling"
},
"target": "develop"
},
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
"workspaceFolder": "/home/blue/ws_blue/src/blue",
"remoteUser": "blue",
"runArgs": [
"--network=host",
Expand Down Expand Up @@ -43,12 +39,6 @@
"editor.tabSize": 2,
"xml.format.maxLineWidth": 100,
"json.format.enable": true,
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.pydocstyleEnabled": true,
"python.linting.mypyEnabled": true,
"python.formatting.provider": "black",
"autoDocstring.startOnNewLine": false,
"autoDocstring.docstringFormat": "google-notypes",
"isort.args": ["--profile", "black"],
Expand Down Expand Up @@ -78,7 +68,8 @@
"editor.rulers": [90],
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[dockerfile]": {
"editor.quickSuggestions": {
Expand Down
26 changes: 26 additions & 0 deletions .devcontainer/nvidia/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ghcr.io/robotic-decision-making-lab/blue:rolling-desktop-nvidia

# Install ROS dependencies
# This is done in a previous stage, but we include it again here in case anyone wants to
# add new dependencies during development
ENV USERNAME=blue
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
WORKDIR $USER_WORKSPACE

COPY --chown=$USER_UID:$USER_GID . src/blue
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install debugging/linting Python packages
COPY --chown=$USER_UID:$USER_GID requirements-dev.txt .
RUN python3 -m pip install -r requirements-dev.txt \
&& rm -rf requirements-dev.txt

# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
ENV PYTHONWARNINGS="ignore"
21 changes: 6 additions & 15 deletions .devcontainer/nvidia/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"dockerFile": "../../.docker/Dockerfile",
"name": "Blue NVIDIA Dev Container",
"dockerFile": "Dockerfile",
"context": "../..",
"build": {
"args": {
"WORKSPACE": "${containerWorkspaceFolder}",
"ROS_DISTRO": "rolling"
},
"target": "desktop-nvidia"
},
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
"workspaceFolder": "/home/blue/ws_blue/src/blue",
"remoteUser": "blue",
"runArgs": [
"--network=host",
Expand Down Expand Up @@ -47,12 +43,6 @@
"editor.tabSize": 2,
"xml.format.maxLineWidth": 100,
"json.format.enable": true,
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.pydocstyleEnabled": true,
"python.linting.mypyEnabled": true,
"python.formatting.provider": "black",
"autoDocstring.startOnNewLine": false,
"autoDocstring.docstringFormat": "google-notypes",
"isort.args": ["--profile", "black"],
Expand Down Expand Up @@ -82,7 +72,8 @@
"editor.rulers": [90],
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[dockerfile]": {
"editor.quickSuggestions": {
Expand Down
6 changes: 2 additions & 4 deletions .docker/compose/nouveau-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
blue:
image: blue
image: ghcr.io/robotic-decision-making-lab/blue:rolling-desktop
environment:
- DISPLAY=${DISPLAY}
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
Expand All @@ -17,6 +17,4 @@ services:
volumes:
- /dev:/dev
- /run/user/1000:/run/user/1000
command: /bin/bash
stdin_open: true
tty: true
command: tail -f /dev/null
6 changes: 3 additions & 3 deletions .docker/compose/nvidia-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: "3"
services:
blue:
image: blue
image: ghcr.io/robotic-decision-making-lab/blue:rolling-desktop-nvidia
environment:
- DISPLAY=${DISPLAY}
- XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
- LIBGL_ALWAYS_SOFTWARE=1
- QT_X11_NO_MITSHM=1
# - WAYLAND_DISPLAY=${WAYLAND_DISPLAY} # Can be commented out if not used
# - PULSE_SERVER=${PULSE_SERVER} # Can be commented out if not used
- WAYLAND_DISPLAY=${WAYLAND_DISPLAY} # Can be commented out if not used
- PULSE_SERVER=${PULSE_SERVER} # Can be commented out if not used
network_mode: host
privileged: true
cap_add:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
push:
branches:
- main
- 120-feature-cleanup-dockerfile
pull_request:
paths:
- .docker/**
Expand Down

0 comments on commit b435bf3

Please sign in to comment.