You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we provide a quick start guide for getting you started with |graphnet|\ GraphNeT.
2
6
3
-
Installation
4
-
============
7
+
Installing From Source
8
+
======================
5
9
6
-
|graphnet|\ GraphNeT is available for Python 3.9 to Python 3.11.
10
+
We recommend installing |graphnet|\ GraphNeT in a separate environment, e.g. using a Python virtual environment or Anaconda (see details on installation `here <https://www.anaconda.com/products/individual>`_).
11
+
With conda installed, you can create a fresh environment like so
7
12
8
-
.. note::
9
-
We recommend installing |graphnet|\ GraphNeT in a separate environment, e.g. using a Python virtual environment or Anaconda (see details on installation `here <https://www.anaconda.com/products/individual>`_).
10
-
With conda installed, you can create a fresh environment like so
Users may want to install |graphnet|\ GraphNeT into an environment that is specific to their experiment. This is useful for converting data from the experiment into a deep learning friendly file format, or when deploying models as part of an experiment-specific processing chain.
36
37
37
-
You may want |graphnet|\ GraphNeT to be able to interface with IceTray, e.g., when converting I3 files to a deep learning friendly file format, or when deploying models as part of an IceTray chain. In these cases, you need to install |graphnet|\ GraphNeT in a Python runtime that has IceTray installed.
38
+
Below are some examples of how to install |graphnet|\ GraphNeT into experiment-specific environments. If your experiment is missing, please feel free to open an issue on the `GitHub repository <https://github.com/graphnet-team/graphnet/issues>`_ and/or contribute a pull request.
38
39
39
-
To achieve this, we recommend installing |graphnet|\ GraphNeT into a CVMFS with IceTray installed, like so:
40
+
IceTray (IceCube & P-ONE)
41
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
42
+
While |graphnet|\ GraphNeT can be installed into existing IceTray environments that is either built from source or distributed through CVMFS, we highly recommend to instead use our existing Docker images that contain both IceTray and GraphNeT. These images are created by installing GraphNeT into public Docker images from the IceCube Collaboration.
43
+
44
+
Details on how to run these images as Apptainer environments are provided in the `Docker & Apptainer Images`_ section.
45
+
46
+
For users who prefer to install |graphnet|\ GraphNeT directly into a CVMFS environment rather than using Docker/Apptainer images, you can follow the steps below. This example uses PyTorch 2.7.0 (CPU) — adjust the PyTorch version and extras according to the compatibility matrix above.
This installation is only necessary if you want to process KM3NeT/ARCA or KM3NeT/ORCA files. Processing means converting them from a `.root` offline format into a suitable format for training using |graphnet|. If you already have your KM3NeT data in `SQLite` or `parquet` format and only want to train a model or perform inference on this database, this specific installation is not needed.
67
+
To use |graphnet|\ GraphNeT in a new terminal session, re-activate the CVMFS distribution and the virtual environment:
62
68
63
-
Note that this installation will add `km3io` ensuring it is built with a compatible versions. The steps below are provided for a conda environment, with an enviroment created in the same way it is done above in this page, but feel free to choose a different enviroment setup.
69
+
.. code-block:: bash
64
70
65
-
As mentioned, it is highly reommended to create a conda enviroment where your installation is done to do not mess up any dependecy. It can be done with the following commands:
which should print the version of |graphnet|\ GraphNeT.
77
+
78
+
km3io (KM3NeT)
79
+
~~~~~~~~~~~~~~~~
80
+
Note that this installation will add `km3io` ensuring it is built with a compatible version. The steps below are provided for a conda environment, with an environment created in the same way it is done above in this page, but feel free to choose a different environment setup.
81
+
82
+
As mentioned, it is highly recommended to create a conda environment where your installation is done to do not mess up any dependency. It can be done with the following commands:
66
83
67
84
.. code-block:: bash
68
85
@@ -71,23 +88,23 @@ As mentioned, it is highly reommended to create a conda enviroment where your in
71
88
# Activate the environment and move to the graphnet repository you just cloned. If using conda:
Choose the appropriate requirements file based on your system. Here there is just an example of installation with PyTorch-2.5.1 but check the matrix above for a full idea of all the versions can be installed.
98
+
Choose the appropriate requirements file based on your system. Here there is just an example of installation with PyTorch-2.5.1 but check the matrix above for a full idea of all the versions that can be installed.
For GPU enviroments with, for instance, CUDA 11.8 drivers:
107
+
For GPU environments with, for instance, CUDA 11.8 drivers:
91
108
92
109
.. code-block:: bash
93
110
@@ -102,5 +119,36 @@ Downgrade setuptools for compatibility between km3io and GraphNeT.
102
119
pip3 install km3io==1.2.0
103
120
104
121
105
-
.. note::
106
-
We recommend installing |graphnet|\ GraphNeT without GPU in clean metaprojects.
122
+
Docker & Apptainer Images
123
+
=========================
124
+
125
+
We provide Docker images for |graphnet|\ GraphNeT. The list of available Docker images with standalone installations of GraphNeT can be found in DockerHub at https://hub.docker.com/r/rorsoe/graphnet/tags.
126
+
127
+
New images are created automatically when a new release is published, and when a new PR is merged to the main branch (latest). Each image comes in both GPU and CPU versions, but with a limited selection of pytorch versions. The Dockerfile for the standalone images is `here <https://github.com/graphnet-team/graphnet/blob/main/docker/standalone/Dockerfile>`_.
128
+
129
+
In compliment to standalone images, we also provide experiment-specific images for:
130
+
131
+
- `IceCube & P-ONE (IceTray+GraphNeT) <https://hub.docker.com/r/rorsoe/graphnet_icetray/tags>`_ which is built using this `Dockerfile <https://github.com/graphnet-team/graphnet/blob/main/docker/icetray/Dockerfile>`_.
132
+
- KM3NeT (km3io+GraphNeT) (Coming Soon)
133
+
134
+
135
+
136
+
Running Docker images as Apptainer environments
137
+
-----------------------------------------------
138
+
While Docker images require sudo-rights to run, they may be converted to Apptainer images and used as virtual environments - providing a convienient way to run |graphnet|\ GraphNeT without sudo-rights or the need to install it on your system.
139
+
140
+
To run one of the Docker images as a Apptainer environment, you can use the following command:
where <path_to_image> is the path to the image you want to use from the DockerHub. For example, if `rorsoe/graphnet:graphnet-1.8.0-cu126-torch26-ubuntu-22.04` is chosen, an image with GraphNeT 1.8.0 + PyTorch 2.6.0 + CUDA 12.6 installed will open. The additional arguments `--cleanenv --env PYTHONNOUSERSITE=1 --env PYTHONPATH=` ensure that the environment is not contaminated with any other packages that may be installed on your system.
147
+
148
+
To run one of the images with IceTray+GraphNeT as a Apptainer environment, you can for example use the following command:
which opens an image with a CPU-installation of GraphNeT 1.8.0 + PyTorch v2.6.0 + IceTray v1.13.0 installed and ready to use. You can replace the image path with the one you want to use from the DockerHub.
0 commit comments