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

Fix gisnav Dockerfile #137

Merged
merged 1 commit into from
Aug 13, 2024
Merged
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
25 changes: 7 additions & 18 deletions docker/mavros/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ ENV ROS_DISTRO=${ROS_DISTRO}

WORKDIR /opt/colcon_ws/src/

# Copy package.xml only to install system dependencies
COPY ros/gisnav/package.xml gisnav/ros/gisnav/package.xml
# .git needed to make pre-commit and git describe work. We create a shallow
# copy of the repo to avoid carrying over all of commit history.
COPY . /tmp/gisnav
RUN git clone --depth 1 /tmp/gisnav/ gisnav/ && \
rm -rf /tmp/gisnav

# Install GISNav system dependencies - we will install
# the setup.py python dependencies later.
Expand All @@ -59,9 +62,6 @@ RUN git clone --branch release/1.14 https://github.com/px4/px4_msgs.git && \
cd .. && \
colcon build --packages-select px4_msgs

# Copy rest of gisnav ros2 package
COPY ros/ gisnav/ros

WORKDIR /opt/colcon_ws/src/gisnav/

# Install python dependencies, mainly torch and related CUDA deps
Expand All @@ -73,9 +73,8 @@ RUN cd ros/gisnav && \
source install/setup.bash && \
colcon build --packages-select gisnav gisnav_msgs

COPY docker/mavros/gisnav/entrypoint.sh /

RUN chmod +x /entrypoint.sh
RUN cp docker/mavros/gisnav/entrypoint.sh / && \
chmod +x /entrypoint.sh

# Download LightGlue pretrained weights
RUN python3 -c \
Expand All @@ -87,8 +86,6 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& apt clean

COPY docs/ docs/

# Node 18 for building the docs (Sphinx dependencies already in setup.py)
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& source ~/.nvm/nvm.sh \
Expand All @@ -97,12 +94,4 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | b
&& cd docs/vitepress \
&& npm install

COPY Makefile .pre-commit-config.yaml LICENSE.md README.md pyproject.toml /opt/colcon_ws/src/gisnav/

# .git needed to make pre-commit and git describe work. We create a shallow
# copy of the repo to avoid carrying over all of commit history.
COPY .git /tmp/gisnav/.git
RUN git clone --depth 1 /tmp/gisnav/.git /opt/colcon_ws/src/gisnav/.git && \
rm -rf /tmp/gisnav/.git

ENTRYPOINT ["/entrypoint.sh"]
Loading