Skip to content

Commit cc2ff0b

Browse files
Cleaned up Docker pipelines (backport #121) (#122)
* Cleaned up Docker pipelines (#121) * Cleaned up Dockerfile and added new user entrypoints * Fixed robot pipeline to support building for arm64 * Updated devcontainer configurations to use latest changes * Testing pipelines * Removed testing branch from pipelines * Precommit * Resolved pr comments (cherry picked from commit 11807c8) # Conflicts: # .devcontainer/nouveau/devcontainer.json # .devcontainer/nvidia/devcontainer.json # .github/ISSUE_TEMPLATE/config.yaml # .github/workflows/ci.yaml * Fixed backport * Fixed config merge conflict --------- Co-authored-by: Evan Palmer <evanp922@gmail.com>
1 parent 1df4ca9 commit cc2ff0b

File tree

14 files changed

+362
-243
lines changed

14 files changed

+362
-243
lines changed

.devcontainer/nouveau/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ghcr.io/robotic-decision-making-lab/blue:iron-desktop
2+
3+
# Install ROS dependencies
4+
# This is done in a previous stage, but we include it again here in case anyone wants to
5+
# add new dependencies during development
6+
ENV USERNAME=blue
7+
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
8+
WORKDIR $USER_WORKSPACE
9+
10+
COPY --chown=$USER_UID:$USER_GID . src/blue
11+
RUN sudo apt-get -q update \
12+
&& sudo apt-get -q -y upgrade \
13+
&& rosdep update \
14+
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
15+
&& sudo apt-get autoremove -y \
16+
&& sudo apt-get clean -y \
17+
&& sudo rm -rf /var/lib/apt/lists/*
18+
19+
# Install debugging/linting Python packages
20+
COPY --chown=$USER_UID:$USER_GID requirements-dev.txt .
21+
RUN python3 -m pip install -r requirements-dev.txt \
22+
&& rm -rf requirements-dev.txt
23+
24+
# Disable the setuputils installation warning
25+
# This prevents us from needing to pin the setuputils version (which doesn't always work)
26+
ENV PYTHONWARNINGS="ignore"

.devcontainer/nouveau/devcontainer.json

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
2-
"dockerFile": "../../.docker/Dockerfile",
2+
"name": "Blue Nouveau Dev Container",
3+
"dockerFile": "Dockerfile",
34
"context": "../..",
4-
"build": {
5-
"args": {
6-
"WORKSPACE": "${containerWorkspaceFolder}",
7-
"ROS_DISTRO": "iron"
8-
},
9-
"target": "develop"
10-
},
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
6+
"workspaceFolder": "/home/blue/ws_blue/src/blue",
117
"remoteUser": "blue",
128
"runArgs": [
139
"--network=host",
@@ -43,12 +39,6 @@
4339
"editor.tabSize": 2,
4440
"xml.format.maxLineWidth": 100,
4541
"json.format.enable": true,
46-
"python.linting.enabled": true,
47-
"python.linting.flake8Enabled": true,
48-
"python.linting.pylintEnabled": false,
49-
"python.linting.pydocstyleEnabled": true,
50-
"python.linting.mypyEnabled": true,
51-
"python.formatting.provider": "black",
5242
"autoDocstring.startOnNewLine": false,
5343
"autoDocstring.docstringFormat": "google-notypes",
5444
"isort.args": ["--profile", "black"],
@@ -76,7 +66,8 @@
7666
"editor.rulers": [90],
7767
"editor.codeActionsOnSave": {
7868
"source.organizeImports": true
79-
}
69+
},
70+
"editor.defaultFormatter": "ms-python.black-formatter"
8071
},
8172
"[dockerfile]": {
8273
"editor.quickSuggestions": {

.devcontainer/nvidia/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ghcr.io/robotic-decision-making-lab/blue:iron-desktop-nvidia
2+
3+
# Install ROS dependencies
4+
# This is done in a previous stage, but we include it again here in case anyone wants to
5+
# add new dependencies during development
6+
ENV USERNAME=blue
7+
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
8+
WORKDIR $USER_WORKSPACE
9+
10+
COPY --chown=$USER_UID:$USER_GID . src/blue
11+
RUN sudo apt-get -q update \
12+
&& sudo apt-get -q -y upgrade \
13+
&& rosdep update \
14+
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
15+
&& sudo apt-get autoremove -y \
16+
&& sudo apt-get clean -y \
17+
&& sudo rm -rf /var/lib/apt/lists/*
18+
19+
# Install debugging/linting Python packages
20+
COPY --chown=$USER_UID:$USER_GID requirements-dev.txt .
21+
RUN python3 -m pip install -r requirements-dev.txt \
22+
&& rm -rf requirements-dev.txt
23+
24+
# Disable the setuputils installation warning
25+
# This prevents us from needing to pin the setuputils version (which doesn't always work)
26+
ENV PYTHONWARNINGS="ignore"

.devcontainer/nvidia/devcontainer.json

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
2-
"dockerFile": "../../.docker/Dockerfile",
2+
"name": "Blue NVIDIA Dev Container",
3+
"dockerFile": "Dockerfile",
34
"context": "../..",
4-
"build": {
5-
"args": {
6-
"WORKSPACE": "${containerWorkspaceFolder}",
7-
"ROS_DISTRO": "iron"
8-
},
9-
"target": "develop-nvidia"
10-
},
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
6+
"workspaceFolder": "/home/blue/ws_blue/src/blue",
117
"remoteUser": "blue",
128
"runArgs": [
139
"--network=host",
@@ -47,24 +43,18 @@
4743
"editor.tabSize": 2,
4844
"xml.format.maxLineWidth": 100,
4945
"json.format.enable": true,
50-
"python.linting.enabled": true,
51-
"python.linting.flake8Enabled": true,
52-
"python.linting.pylintEnabled": false,
53-
"python.linting.pydocstyleEnabled": true,
54-
"python.linting.mypyEnabled": true,
55-
"python.formatting.provider": "black",
5646
"autoDocstring.startOnNewLine": false,
5747
"autoDocstring.docstringFormat": "google-notypes",
5848
"isort.args": ["--profile", "black"],
5949
"isort.check": true,
6050
"python.autoComplete.extraPaths": [
61-
"/opt/ros/rolling/lib/python3.10/site-packages/",
62-
"/opt/ros/rolling/local/lib/python3.10/dist-packages/",
51+
"/opt/ros/iron/lib/python3.10/site-packages/",
52+
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
6353
"${workspaceFolder}/install/"
6454
],
6555
"python.analysis.extraPaths": [
66-
"/opt/ros/rolling/lib/python3.10/site-packages/",
67-
"/opt/ros/rolling/local/lib/python3.10/dist-packages/",
56+
"/opt/ros/iron/lib/python3.10/site-packages/",
57+
"/opt/ros/iron/local/lib/python3.10/dist-packages/",
6858
"${workspaceFolder}/install/"
6959
],
7060
"C_Cpp.default.intelliSenseMode": "linux-gcc-x86",
@@ -82,7 +72,8 @@
8272
"editor.rulers": [90],
8373
"editor.codeActionsOnSave": {
8474
"source.organizeImports": true
85-
}
75+
},
76+
"editor.defaultFormatter": "ms-python.black-formatter"
8677
},
8778
"[dockerfile]": {
8879
"editor.quickSuggestions": {

0 commit comments

Comments
 (0)