@@ -40,8 +40,11 @@ ENV ROS_DISTRO=${ROS_DISTRO}
40
40
41
41
WORKDIR /opt/colcon_ws/src/
42
42
43
- # Copy package.xml only to install system dependencies
44
- COPY ros/gisnav/package.xml gisnav/ros/gisnav/package.xml
43
+ # .git needed to make pre-commit and git describe work. We create a shallow
44
+ # copy of the repo to avoid carrying over all of commit history.
45
+ COPY . /tmp/gisnav
46
+ RUN git clone --depth 1 /tmp/gisnav/ gisnav/ && \
47
+ rm -rf /tmp/gisnav
45
48
46
49
# Install GISNav system dependencies - we will install
47
50
# the setup.py python dependencies later.
@@ -59,9 +62,6 @@ RUN git clone --branch release/1.14 https://github.com/px4/px4_msgs.git && \
59
62
cd .. && \
60
63
colcon build --packages-select px4_msgs
61
64
62
- # Copy rest of gisnav ros2 package
63
- COPY ros/ gisnav/ros
64
-
65
65
WORKDIR /opt/colcon_ws/src/gisnav/
66
66
67
67
# Install python dependencies, mainly torch and related CUDA deps
@@ -73,9 +73,8 @@ RUN cd ros/gisnav && \
73
73
source install/setup.bash && \
74
74
colcon build --packages-select gisnav gisnav_msgs
75
75
76
- COPY docker/mavros/gisnav/entrypoint.sh /
77
-
78
- RUN chmod +x /entrypoint.sh
76
+ RUN cp docker/mavros/gisnav/entrypoint.sh / && \
77
+ chmod +x /entrypoint.sh
79
78
80
79
# Download LightGlue pretrained weights
81
80
RUN python3 -c \
@@ -87,8 +86,6 @@ RUN apt-get update \
87
86
&& rm -rf /var/lib/apt/lists/* \
88
87
&& apt clean
89
88
90
- COPY docs/ docs/
91
-
92
89
# Node 18 for building the docs (Sphinx dependencies already in setup.py)
93
90
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
94
91
&& source ~/.nvm/nvm.sh \
@@ -97,12 +94,4 @@ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | b
97
94
&& cd docs/vitepress \
98
95
&& npm install
99
96
100
- COPY Makefile .pre-commit-config.yaml LICENSE.md README.md pyproject.toml /opt/colcon_ws/src/gisnav/
101
-
102
- # .git needed to make pre-commit and git describe work. We create a shallow
103
- # copy of the repo to avoid carrying over all of commit history.
104
- COPY .git /tmp/gisnav/.git
105
- RUN git clone --depth 1 /tmp/gisnav/.git /opt/colcon_ws/src/gisnav/.git && \
106
- rm -rf /tmp/gisnav/.git
107
-
108
97
ENTRYPOINT ["/entrypoint.sh" ]
0 commit comments