-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Docker container for development #307
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# superflore-devel | ||
# Copyright (C) 2024 Wind River Systems, Inc. | ||
# | ||
# SPDX-License-Identifier: MIT | ||
# | ||
|
||
FROM osrf/ros2:devel | ||
|
||
ENV ROS_HOME="/home/ubuntu" | ||
ENV ROSDEP_SOURCE_PATH="/home/ubuntu/rosdep" | ||
ENV ROS_DISTRO="rolling" | ||
ENV ROSDISTRO_URL="https://raw.githubusercontent.com/ros/rosdistro/master/rosdep" | ||
ENV GIT_FULLNAME="Firstname Lastname" | ||
ENV GIT_EMAIL="[email protected]" | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
apt-utils \ | ||
curl \ | ||
locales \ | ||
python3 \ | ||
python3-pip \ | ||
python3.12-venv \ | ||
python3-virtualenv \ | ||
vim \ | ||
wget && \ | ||
apt-get clean && \ | ||
locale-gen en_US en_US.UTF-8 && \ | ||
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ | ||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
||
USER ubuntu | ||
WORKDIR /home/ubuntu | ||
|
||
RUN git config --global user.email "${GIT_EMAIL}" && \ | ||
git config --global user.name "${GIT_FULLNAME}" | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ pyyaml | |
pygithub | ||
catkin_pkg | ||
rospkg | ||
setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
# export ROS_HOME=${HOME} | ||
if [ -z "$ROS_HOME" ]; then | ||
echo "ROS_HOME is not set" | ||
exit 1 | ||
fi | ||
|
||
# export ROSDEP_SOURCE_PATH=${ROS_HOME}/rosdep | ||
if [ -z "$ROSDEP_SOURCE_PATH" ]; then | ||
echo "ROSDEP_SOURCE_PATH is not set" | ||
exit 1 | ||
fi | ||
mkdir -p ${ROSDEP_SOURCE_PATH} | ||
|
||
PROJECT_DIR=$PWD | ||
|
||
python3 -m venv $HOME/superflore_venv | ||
source $HOME/superflore_venv/bin/activate | ||
python3 -m pip install . | ||
|
||
echo "Running rosdep init" | ||
rosdep init | ||
|
||
echo "Running rosdep update" | ||
rosdep update | ||
|
||
cd ${PROJECT_DIR} | ||
ROSDISTRO_GIT="https://github.com/ros/rosdistro" | ||
git clone ${ROSDISTRO_GIT} ${HOME}/rosdistro | ||
|
||
ROSDISTRO_URL="https://raw.githubusercontent.com/ros/rosdistro/master/rosdep" | ||
sed -i -e "s|${ROSDISTRO_URL}|file://${HOME}/rosdistro/rosdep|" ${ROSDEP_SOURCE_PATH}/20-default.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember exactly how python packaging handles extraneous files. Do we need to explicitly "ignore" these so that they aren't incorporated into the packaged archive or does this count as a data file which pip won't include unless told.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be a problem for Setuptools, Poetry, Flit, Hatch, or PDM. Most have explicit include and excludes lists, but setuptools also has a few pre-defined files that get automatically included: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
It doesn't seem like the Dockerfile or setup script would get automatically included.