File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # STAGE 1
2+ FROM rust:1-bookworm AS builder
3+
4+ WORKDIR /app
5+
6+ RUN apt-get update && apt-get install -y \
7+ python3 \
8+ python3-dev \
9+ build-essential \
10+ libssl-dev \
11+ pkg-config \
12+ ca-certificates \
13+ libclang-dev \
14+ && rm -rf /var/lib/apt/lists/*
15+
16+ COPY Cargo.toml Cargo.lock ./
17+ COPY . .
18+
19+ ENV PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
20+
21+ RUN cargo build --release --manifest-path ./Cargo.toml
22+
23+ # STAGE 2
24+ FROM debian:bookworm-slim
25+
26+ RUN apt-get update && apt-get install -y \
27+ python3 \
28+ python3-venv \
29+ libpython3.11 \
30+ libssl-dev \
31+ ca-certificates \
32+ && rm -rf /var/lib/apt/lists/*
33+
34+ WORKDIR /app
35+
36+ COPY --from=builder /app/target/release/nexum /usr/local/bin/nexum
37+
38+ COPY nexum_ai ./nexum_ai
39+
40+ RUN python3 -m venv .venv && \
41+ . .venv/bin/activate && \
42+ pip install --no-cache-dir -r nexum_ai/requirements.txt
43+
44+ ENV PATH="/app/.venv/bin:$PATH"
45+ ENV VIRTUAL_ENV="/app/.venv"
46+
47+ CMD ["nexum" ]
You can’t perform that action at this time.
0 commit comments