1- FROM python:3.9-slim as builder
1+ FROM python:3.9-slim AS builder
22
33# Avoid prompts from apt
44ENV DEBIAN_FRONTEND=noninteractive
@@ -8,22 +8,27 @@ WORKDIR /app
88COPY requirements.txt /app/
99COPY deps/CFPQ_Data /app/deps/CFPQ_Data
1010
11- RUN apt-get update && apt-get install -y gcc python3-dev libgraphblas-dev
11+ RUN apt-get update && apt-get install -y \
12+ python3-dev \
13+ git \
14+ wget \
15+ make \
16+ ninja-build \
17+ gcc \
18+ libomp-dev \
19+ && wget -qO- "https://cmake.org/files/v3.19/cmake-3.19.1-Linux-x86_64.tar.gz" \
20+ | tar --strip-components=1 -xz -C /usr/local
21+ ENV GraphBLAS_ROOT=/usr/local
22+ RUN cd deps \
23+ && git clone --depth 1 --branch vkutuev/kron https://github.com/vkutuev/GraphBLAS.git \
24+ && cmake -S ./GraphBLAS -B ./GraphBLAS/build -G Ninja -DCMAKE_INSTALL_PREFIX="$GraphBLAS_ROOT" \
25+ && cmake --build ./GraphBLAS/build \
26+ && cmake --install ./GraphBLAS/build
27+ RUN pip install --no-binary suitesparse-graphblas suitesparse-graphblas==7.4.3
1228RUN pip3 install pygraphblas==5.1.8.0
1329RUN pip3 install -r requirements.txt
1430RUN cd deps/CFPQ_Data && python3 setup.py install
1531
16- FROM python:3.9-slim
17-
18- RUN apt update && apt install -y time git
19-
20- COPY --from=builder /usr/local /usr/local
21-
22- RUN echo 'echo Welcome to the CFPQ_PyAlgo Docker container!' >> /root/.bashrc \
23- && echo 'echo "Run \` python3 -m cfpq_cli.run_all_pairs_cflr --help\` to see the usage message."' >> /root/.bashrc \
24- && echo 'echo "Detailed documentation is available in the \` /app/docs/\` folder."' >> /root/.bashrc
25-
26- WORKDIR /app
2732COPY . /app
2833
2934ENTRYPOINT ["/bin/bash" ]
0 commit comments