Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim as builder
FROM python:3.9-slim AS builder

# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -8,22 +8,27 @@ WORKDIR /app
COPY requirements.txt /app/
COPY deps/CFPQ_Data /app/deps/CFPQ_Data

RUN apt-get update && apt-get install -y gcc python3-dev libgraphblas-dev
RUN apt-get update && apt-get install -y \
python3-dev \
git \
wget \
make \
ninja-build \
gcc \
libomp-dev \
&& wget -qO- "https://cmake.org/files/v3.19/cmake-3.19.1-Linux-x86_64.tar.gz" \
| tar --strip-components=1 -xz -C /usr/local
ENV GraphBLAS_ROOT=/usr/local
RUN cd deps \
&& git clone --depth 1 --branch vkutuev/kron https://github.com/vkutuev/GraphBLAS.git \
&& cmake -S ./GraphBLAS -B ./GraphBLAS/build -G Ninja -DCMAKE_INSTALL_PREFIX="$GraphBLAS_ROOT" \
&& cmake --build ./GraphBLAS/build \
&& cmake --install ./GraphBLAS/build
RUN pip install --no-binary suitesparse-graphblas suitesparse-graphblas==7.4.3
RUN pip3 install pygraphblas==5.1.8.0
RUN pip3 install -r requirements.txt
RUN cd deps/CFPQ_Data && python3 setup.py install

FROM python:3.9-slim

RUN apt update && apt install -y time git

COPY --from=builder /usr/local /usr/local

RUN echo 'echo Welcome to the CFPQ_PyAlgo Docker container!' >> /root/.bashrc \
&& echo 'echo "Run \`python3 -m cfpq_cli.run_all_pairs_cflr --help\` to see the usage message."' >> /root/.bashrc \
&& echo 'echo "Detailed documentation is available in the \`/app/docs/\` folder."' >> /root/.bashrc

WORKDIR /app
COPY . /app

ENTRYPOINT ["/bin/bash"]
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pytest==8.0.1
pytest-benchmark
pytest-cov
cfpq_data==1.0.2
suitesparse-graphblas==8.2.1.0
python-graphblas==2024.2.0
pandas==2.0.3
numpy==1.23.5
Expand Down