-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add latest cuGraph #458
Draft
gitbuda
wants to merge
23
commits into
main
Choose a base branch
from
build-memgraph-2_15_1-latest-cugraph-docker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add latest cuGraph #458
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f1674d1
Add latest cuGraph
gitbuda 5859b13
Update all versions
gitbuda 8dd7aec
Fix libcugraph paths
gitbuda d7b5880
Make pip install to pass, dgl fails because of FindCUDA arch unknown
gitbuda dee55aa
Add experiments_to_delete script
gitbuda af269d3
Add Dockerfile.experiment
gitbuda c7f3828
spdlog making problems
gitbuda 4cae1fe
Move to Memgraph v2.16.0
gitbuda 93a3be9
Add potential solution for spdlog
gitbuda 38dcb33
Fix basic includes and arch setup
gitbuda f9b297b
Add latest changes, mostly comments and all on rapids v24.04
gitbuda 43295ab
Align everything to C++17 but it does NOT help
gitbuda b9db63a
Fix basic compilation errors -> cugraph API changed -> FIXIT
gitbuda 26ddd45
Move to the latest memgraph
gitbuda f9eaf83
All cugraph modules are compilable -> TESTING next
gitbuda a233c5a
Add working cugraph.pagerank
gitbuda 7a121ba
Build and package all, tests still fails (deps)
gitbuda e7af2d9
Add IPR example1 for CPU and GPU
gitbuda 061c0c9
Improve and suppress some warnings under pagerank
gitbuda 8959cf9
Add list command to test_e2e
gitbuda d991740
Upgrade to the latest version of Memgraph
gitbuda bda68b0
Fix betweenness centrality
gitbuda 5dae101
Make Leiden runnable (still doesn't work correctly)
gitbuda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ htmlcov | |
dist | ||
**/__pycache__ | ||
cpp/build | ||
cpp/memgraph/build | ||
Dockerfile* | ||
.dockerignore | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# It's important to be 3.10 on Ubuntu 22.04 because memgraph binary depends on exactly that version. | ||
ARG PY_VERSION=3.10 | ||
ARG CUDA_VERSION=12.2 | ||
ARG CUDA_VERSION_MINOR=12.2.2 | ||
ARG RAPIDS_VERSION=24.04a | ||
ARG MG_VERSION=2.16.0 | ||
# TODO(gitbuda): Try to build on ARM and adjust settings if needed. | ||
|
||
## COMPILATION | ||
FROM rapidsai/base:${RAPIDS_VERSION}-cuda${CUDA_VERSION}-py${PY_VERSION} as rapids-dev | ||
FROM nvidia/cuda:${CUDA_VERSION_MINOR}-devel-ubuntu22.04 AS cuda-dev | ||
USER root | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG PY_VERSION | ||
ENV PY_VERSION ${PY_VERSION} | ||
|
||
### SYSTEM SETUP | ||
COPY --from=rapids-dev /opt/conda/lib/libcugraph.so /opt/conda/lib/libcugraph.so | ||
COPY --from=rapids-dev /opt/conda/lib/libcugraph-ops++.so /opt/conda/lib/libcugraph-ops++.so | ||
COPY --from=rapids-dev /opt/conda/lib/libraft.so /opt/conda/lib/libraft.so | ||
COPY --from=rapids-dev /opt/conda/include /opt/conda/include | ||
# Prevent from linking the Conda environment | ||
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/lib | ||
RUN apt-get update && apt-get install -y \ | ||
vim `memgraph` \ | ||
libcurl4 `memgraph` \ | ||
libpython${PY_VERSION} `memgraph` \ | ||
libssl3 `memgraph` \ | ||
libssl-dev `memgraph` \ | ||
openssl `memgraph` \ | ||
build-essential `mage-memgraph` \ | ||
cmake `mage-memgraph` \ | ||
curl `mage-memgraph` \ | ||
g++ `mage-memgraph` \ | ||
python3 `mage-memgraph` \ | ||
python3-pip `mage-memgraph` \ | ||
python3-setuptools `mage-memgraph` \ | ||
python3-dev `mage-memgraph` \ | ||
clang `mage-memgraph` \ | ||
git `mage-memgraph` \ | ||
unixodbc-dev `mage-memgraph` \ | ||
software-properties-common `mage-cugraph` \ | ||
lsb-release `mage-cugraph` \ | ||
wget `mage-cugraph` \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | ||
# Install newest CMake (cuGraph requires >= 20.01) | ||
&& wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \ | ||
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \ | ||
apt-get install -y \ | ||
cmake `mage-memgraph` \ | ||
--no-install-recommends | ||
ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/cmake:/usr/lib/cmake | ||
# TODO(gitbuda): How to cleanup rust installation cache? | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
ENV PATH="${PATH}:/root/.cargo/bin" | ||
# # NOTE: miniconda will be installed under /root/miniconda3 | ||
# RUN cd /root && \ | ||
# curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ | ||
# bash miniconda.sh -b | ||
WORKDIR /mage | ||
COPY . /mage | ||
RUN python3 -m pip install -r /mage/python/requirements.txt && \ | ||
python3 -m pip install -r /mage/python/tests/requirements.txt | ||
# TODO(gitbuda): Experiment with pipx, the below works on debian-12 (on newer systems) | ||
# RUN python3 -m pip install --break-system-packages -r /mage/python/requirements.txt && \ | ||
# python3 -m pip install --break-system-packages -r /mage/python/tests/requirements.txt | ||
|
||
### BUILD | ||
RUN python3 /mage/setup build \ | ||
--gpu \ | ||
--cpp-build-flags \ | ||
CMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
MAGE_CUGRAPH_ROOT=/opt/conda/ \ | ||
-p /usr/lib/memgraph/query_modules/ | ||
|
||
## RUNTIME | ||
# TODO(gitbuda): Add the ability to inject local RelWithDebInfo package of Memgraph | ||
FROM nvidia/cuda:${CUDA_VERSION_MINOR}-runtime-ubuntu22.04 AS cuda-prod | ||
USER root | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG MG_VERSION | ||
ENV MG_VERSION ${MG_VERSION} | ||
ARG PY_VERSION | ||
ENV PY_VERSION ${PY_VERSION} | ||
|
||
#### SYSTEM SETUP | ||
COPY --from=cuda-dev /usr/lib/memgraph/query_modules/ /usr/lib/memgraph/query_modules/ | ||
COPY --from=cuda-dev /opt/conda/lib/libcugraph.so /opt/conda/lib/libcugraph.so | ||
COPY --from=cuda-dev /opt/conda/lib/libcugraph-ops++.so /opt/conda/lib/libcugraph-ops++.so | ||
COPY --from=cuda-dev /opt/conda/lib/libraft.so /opt/conda/lib/libraft.so | ||
COPY --from=cuda-dev /usr/lib/python${PY_VERSION}/ /usr/lib/python${PY_VERSION}/ | ||
# TODO(gitbuda): Consider how to copy all the requirements from python -> because the above is not full, e.g. networkx is not working. | ||
RUN rm -rf /etc/apt/sources.list.d/cuda* | ||
RUN apt-get update && apt-get install -y \ | ||
libcurl4 `memgraph` \ | ||
libpython${PY_VERSION} `memgraph` \ | ||
libssl3 `memgraph` \ | ||
libssl-dev `memgraph` \ | ||
openssl `memgraph` \ | ||
curl `mage-memgraph` \ | ||
libgomp1 `mage-memgraph` \ | ||
python3 `mage-memgraph` \ | ||
python3-setuptools `mage-memgraph` \ | ||
&& curl https://download.memgraph.com/memgraph/v${MG_VERSION}/ubuntu-22.04/memgraph_${MG_VERSION}-1_amd64.deb --output memgraph.deb \ | ||
&& dpkg -i memgraph.deb \ | ||
&& rm memgraph.deb \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
ENV PATH="/usr/lib/python${PY_VERSION}:${PATH}" | ||
# TODO(gitbuda): extra packages python3-setuptools, python3-pip, cmake -> make sure the dev step wasn't wrongly cached. | ||
# TODO(gitbuda): The rm part should be under the apt install RUN part (/mage is not present here) | ||
RUN rm -rf /mage \ | ||
&& export PATH="/usr/lib/python${PY_VERSION}:${PATH}" \ | ||
&& apt-get -y --purge autoremove curl python3-dev \ | ||
&& apt-get clean | ||
|
||
USER memgraph | ||
ENTRYPOINT ["/usr/lib/memgraph/memgraph"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG PY_VERSION=3.11 | ||
ARG RAPIDS_VERSION=24.06a | ||
ARG CUDA_VERSION=12.2 | ||
ARG CUDA_VERSION_MINOR=12.2.2 | ||
ARG MG_VERSION=2.15.1 | ||
|
||
FROM rapidsai/base:${RAPIDS_VERSION}-cuda${CUDA_VERSION}-py${PY_VERSION} as rapids-dev | ||
RUN ls -alh /opt/ && ls -alh /opt/conda/ && ls -alh /opt/conda/lib/ | grep cugraph | ||
RUN nvcc --version | ||
# | ||
# FROM nvidia/cuda:${CUDA_VERSION_MINOR}-devel-ubuntu22.04 AS cuda-dev | ||
# RUN ls -alh /opt/ && ls -alh /opt/nvidia/ | ||
# RUN nvcc --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
CUDA::toolkit
here probably should be deleted here because it's already included.