-
Notifications
You must be signed in to change notification settings - Fork 87
Guide to GPUDrive setup on NYU HPC
Clone the gpudrive repository into your /scratch/$USER directory.
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 /scratch/$USER/image
cd /scratch/$USER/image-
- Copy and decompress the overlay image:
cp /scratch/work/public/overlay-fs-ext3/overlay-50G-10M.ext3.gz .
gunzip overlay-50G-10M.ext3.gzNote: There are other overlay images that should work fine as well.
-
- Verify the decompressed overlay image exists:
ls /scratch/$USER/imageRun the following to start the container with GPU support and the overlay image:
singularity exec --nv --overlay /scratch/$USER/image/overlay-50G-10M.ext3:rw \
/scratch/work/public/singularity/cuda12.2.2-cudnn8.9.4-devel-ubuntu22.04.3.sif /bin/bashMore details about steps 3 and 4 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:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j # cores to build with, e.g. 32
cd ..error
(.venv) Singularity> cmake .. -DCMAKE_BUILD_TYPE=Release
CMake Error at CMakeLists.txt:4 (include):
include could not find requested file:
/home/dc4971/gpudrive/external/madrona/cmake/madrona_init.cmake
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:8 (include):
include could not find requested file:
setup
CMake Error at CMakeLists.txt:9 (include):
include could not find requested file:
dependencies
CMake Error at external/CMakeLists.txt:1 (set):
Maximum recursion depth of 1000 exceeded
-- 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