Skip to content

Commit 2c4e249

Browse files
evan-palmermergify[bot]
authored andcommitted
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
1 parent 1df4ca9 commit 2c4e249

File tree

13 files changed

+366
-218
lines changed

13 files changed

+366
-218
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:rolling-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: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
{
2-
"dockerFile": "../../.docker/Dockerfile",
2+
"name": "Blue Nouveau Dev Container",
3+
"dockerFile": "Dockerfile",
34
"context": "../..",
5+
<<<<<<< HEAD
46
"build": {
57
"args": {
68
"WORKSPACE": "${containerWorkspaceFolder}",
79
"ROS_DISTRO": "iron"
810
},
911
"target": "develop"
1012
},
13+
=======
14+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
15+
"workspaceFolder": "/home/blue/ws_blue/src/blue",
16+
>>>>>>> 11807c8 (Cleaned up Docker pipelines (#121))
1117
"remoteUser": "blue",
1218
"runArgs": [
1319
"--network=host",
@@ -43,12 +49,6 @@
4349
"editor.tabSize": 2,
4450
"xml.format.maxLineWidth": 100,
4551
"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",
5252
"autoDocstring.startOnNewLine": false,
5353
"autoDocstring.docstringFormat": "google-notypes",
5454
"isort.args": ["--profile", "black"],
@@ -76,7 +76,8 @@
7676
"editor.rulers": [90],
7777
"editor.codeActionsOnSave": {
7878
"source.organizeImports": true
79-
}
79+
},
80+
"editor.defaultFormatter": "ms-python.black-formatter"
8081
},
8182
"[dockerfile]": {
8283
"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:rolling-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: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
{
2-
"dockerFile": "../../.docker/Dockerfile",
2+
"name": "Blue NVIDIA Dev Container",
3+
"dockerFile": "Dockerfile",
34
"context": "../..",
5+
<<<<<<< HEAD
46
"build": {
57
"args": {
68
"WORKSPACE": "${containerWorkspaceFolder}",
79
"ROS_DISTRO": "iron"
810
},
911
"target": "develop-nvidia"
1012
},
13+
=======
14+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
15+
"workspaceFolder": "/home/blue/ws_blue/src/blue",
16+
>>>>>>> 11807c8 (Cleaned up Docker pipelines (#121))
1117
"remoteUser": "blue",
1218
"runArgs": [
1319
"--network=host",
@@ -47,12 +53,6 @@
4753
"editor.tabSize": 2,
4854
"xml.format.maxLineWidth": 100,
4955
"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",
5656
"autoDocstring.startOnNewLine": false,
5757
"autoDocstring.docstringFormat": "google-notypes",
5858
"isort.args": ["--profile", "black"],
@@ -82,7 +82,8 @@
8282
"editor.rulers": [90],
8383
"editor.codeActionsOnSave": {
8484
"source.organizeImports": true
85-
}
85+
},
86+
"editor.defaultFormatter": "ms-python.black-formatter"
8687
},
8788
"[dockerfile]": {
8889
"editor.quickSuggestions": {

0 commit comments

Comments
 (0)