-
Notifications
You must be signed in to change notification settings - Fork 87
Guide to GPUDrive setup on NYU HPC
TODO
Clone the gpudrive repository into your /home/$USER directory (info on HPC directories and data management).
git clone --recursive https://github.com/Emerge-Lab/gpudrive.gitMove into the cloned repository folder:
cd gpudrive-
- Create a directory for overlay files:
mkdir -p /home/$USER/gpudrive/integrations/hpc
cd /home/$USER/gpudrive/integrations/hpc-
- Copy and decompress the overlay image:
cp /scratch/work/public/overlay-fs-ext3/overlay-10GB-400K.ext3.gz .
gunzip overlay-10GB-400K.ext3.gzThis may take a couple of minutes, depending on the size of the overlay image.
Note: There are other overlay images that should work fine as well.
-
- Verify the decompressed overlay image exists:
ls /home/$USER/gpudrive/integrations/hpcRun the following to start the container with GPU support and the overlay image:
cd ../..singularity exec --nv --overlay /home/$USER/gpudrive/integrations/hpc/overlay-10GB-400K.ext3:rw \
/scratch/work/public/singularity/cuda12.2.2-cudnn8.9.4-devel-ubuntu22.04.3.sif /bin/bashyou will see:
Singularity> Details on Sinularity and overlay images on NYU HPC here.
- Inside the Singularity container, create a virtual environment:
python3 -m venv .venv- Activate the virtual environment:
source .venv/bin/activateFor detailed instructions, see the GPUDrive README. Here we use the manual install option.
- Build C++ codebase:
Inside the
gpudrivefolder, do:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 32 # cores to build with, e.g. 32
cd ..error
-- Including X11 support
-- Found X11: /usr/include
-- Using the multi-header code from /home/dc4971/gpudrive/external/json/include/
CMake Error at src/CMakeLists.txt:65 (madrona_python_module):
Unknown CMake command "madrona_python_module".
-- Configuring incomplete, errors occurred!
See also "/home/dc4971/gpudrive/build/CMakeFiles/CMakeOutput.log".
- Exit the Singularity container:
exit-
Relaunch the container using the same command as in Step 4.
-
Inside the container, activate the virtual environment:
source .venv/bin/activate- Verify the GPUDrive installation:
# Launch Python
python
# Check GPUDrive import
>>> import gpudriveIf there are no errors, the installation is successful.
-
Request an interactive compute node:
srun --nodes=1 --tasks-per-node=1 --cpus-per-task=1 --mem=10GB --gres=gpu:1 \ --time=1:00:00 --partition=<gpu_partition> --pty /bin/bash
Replace
<gpu_partition>with the appropriate partition (e.g.,short,gpu). -
Navigate to the repository:
cd /scratch/$USER/gpudrive
-
Launch the Singularity image:
bash ./scripts/hpc/launch_image.sh
-
Activate the virtual environment:
source .venv/bin/activate
Navigate to the repo:
cd /scratch/$USER/gpudriveLaunch the Singularity image:
bash ./scripts/hpc/launch_image.shActivate the Python virtual environment:
source .venv/bin/activate