-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (42 loc) · 1.49 KB
/
Dockerfile
File metadata and controls
58 lines (42 loc) · 1.49 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
### Stage 1: Build the MultiAgentSolver Library and Examples
FROM ubuntu:22.04 AS builder
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Create a working directory
WORKDIR /workspace
# Copy the source code into the container
COPY . /workspace
COPY cmake /workspace/cmake
# Make scripts executable
RUN chmod +x /workspace/scripts/*.sh
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libeigen3-dev \
libomp-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Run the dependency setup script
RUN /workspace/scripts/setup_dependencies.sh
# Build the project using the build script
RUN /workspace/scripts/build.sh Release && /workspace/scripts/run.sh
# ### Stage 2: Create a minimal runtime image
# FROM ubuntu:22.04 AS runner
# # Install required runtime dependencies
# RUN apt-get update && apt-get install -y \
# libeigen3-dev \
# libomp-dev \
# && rm -rf /var/lib/apt/lists/*
# # Set working directory
# WORKDIR /opt/multi_agent_solver
# # Copy built binaries and necessary files from builder
# COPY --from=builder /workspace/build/release /opt/multi_agent_solver/bin
# # Copy the run script for convenience
# COPY --from=builder /workspace/scripts/run.sh /opt/multi_agent_solver/run.sh
# # Make the script executable
# RUN chmod +x /opt/multi_agent_solver/run.sh
# # Set the PATH
# ENV PATH="/opt/multi_agent_solver/bin:${PATH}"
# # Default command to run the script
# CMD ["/opt/multi_agent_solver/run.sh", "Release"]