-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 878 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 878 Bytes
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
FROM python:3.12-slim
LABEL org.opencontainers.image.source="https://github.com/ise-research/linkanchor"
# 1. Install Rust toolchain
RUN apt-get update && apt-get install -y \
curl \
build-essential \
git \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Add Rust to PATH
ENV PATH="/root/.cargo/bin:${PATH}"
# 2. Set working directory
WORKDIR /app
# 3. Copy project files
COPY . .
# 4. Install Python dependencies
RUN pip install .
# 5. Build rust-written modules using maturin
RUN cd /app/src/git-wrapper && maturin build --release && pip install --no-cache-dir target/wheels/*.whl
RUN cd /app/src/code-wrapper && maturin build --release && pip install --no-cache-dir target/wheels/*.whl
# 6. Define the entry point for the agent
ENTRYPOINT ["python", "-m", "src.main"]