Skip to content

Commit

Permalink
docker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Aug 21, 2024
1 parent ab87b6f commit dd0716d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
FROM python:3.10-slim-buster as builder

# Install build essentials and Rust
# Install build essentials, Rust, and additional dependencies
RUN apt-get update \
&& apt-get install -y build-essential curl \
&& apt-get install -y build-essential curl cmake pkg-config libssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

# Add Cargo to PATH
ENV PATH="/root/.cargo/bin:${PATH}"

# Upgrade pip and install maturin
RUN pip install --upgrade pip \
&& pip install maturin

COPY requirements.txt .
COPY requirements_advanced.txt .
RUN pip install --user --no-cache-dir -r requirements.txt

# Install Python packages, handling primp separately
RUN pip install --user --no-cache-dir $(grep -v primp requirements.txt) \
&& RUSTFLAGS="-C target-feature=-crt-static" pip install --user --no-cache-dir primp
# RUN pip install --user --no-cache-dir -r requirements_advanced.txt

FROM python:3.10-slim-buster
Expand Down

0 comments on commit dd0716d

Please sign in to comment.