-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
61 lines (50 loc) · 1.46 KB
/
Copy pathDockerfile.base
File metadata and controls
61 lines (50 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Base ROS2 Humble Dockerfile for Codenames Game
FROM osrf/ros:humble-desktop
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV ROS_DOMAIN_ID=42
ENV PYTHONUNBUFFERED=1
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3-pip \
python3-colcon-common-extensions \
python3-rosdep \
curl \
git \
nano \
&& rm -rf /var/lib/apt/lists/*
# Install Python packages for LLM APIs
RUN pip3 install \
openai \
anthropic \
requests \
numpy \
flask \
flask-cors \
flask-socketio \
python-socketio \
eventlet \
aiohttp
# Create workspace
WORKDIR /ros2_ws
RUN mkdir -p src config
# Initialize rosdep if not already done
RUN rosdep update || true
# Copy source files first
COPY src/ /ros2_ws/src/
# Create config directory (remove problematic COPY)
RUN mkdir -p /ros2_ws/config
# Install rosdep dependencies (skip python3-requests since we have it via pip)
RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
rosdep install --from-paths src --ignore-src -r -y \
--skip-keys='python3-requests python3-numpy' || true"
# Build workspace
RUN /bin/bash -c "source /opt/ros/humble/setup.bash && \
colcon build --symlink-install"
# Source setup files
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
RUN echo "source /ros2_ws/install/setup.bash" >> ~/.bashrc
# Set entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]