Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up Docker pipelines (backport #121) #123

Merged
merged 3 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .devcontainer/nouveau/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ghcr.io/robotic-decision-making-lab/blue:humble-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": "humble"
},
"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 @@ -76,7 +66,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:humble-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"
29 changes: 10 additions & 19 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": "humble"
},
"target": "develop-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,24 +43,18 @@
"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"],
"isort.check": true,
"python.autoComplete.extraPaths": [
"/opt/ros/rolling/lib/python3.10/site-packages/",
"/opt/ros/rolling/local/lib/python3.10/dist-packages/",
"/opt/ros/humble/lib/python3.10/site-packages/",
"/opt/ros/humble/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"python.analysis.extraPaths": [
"/opt/ros/rolling/lib/python3.10/site-packages/",
"/opt/ros/rolling/local/lib/python3.10/dist-packages/",
"/opt/ros/humble/lib/python3.10/site-packages/",
"/opt/ros/humble/local/lib/python3.10/dist-packages/",
"${workspaceFolder}/install/"
],
"C_Cpp.default.intelliSenseMode": "linux-gcc-x86",
Expand All @@ -82,7 +72,8 @@
"editor.rulers": [90],
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"editor.defaultFormatter": "ms-python.black-formatter"
},
"[dockerfile]": {
"editor.quickSuggestions": {
Expand Down
Loading