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
32 changes: 20 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,24 @@ jobs:
- name: Build Docker image
run: docker build --tag gpudrive:latest .

- name: Run smoke test inside Docker container
- name: Run smoke test inside Docker container (using a here document)
run: |
docker run --rm gpudrive:latest /bin/bash -c "
echo 'Dummy cuda' \
&& ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 \
&& export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH \
&& echo 'Modifications to run without extra data' \
&& sed -i 's|train_path: \"data/processed/training\"|train_path: \"data/processed/examples\"|g' examples/experimental/config/visualization_config.yaml \
&& sed -i '/# Load policy/{N;N;N;N;N;N;s|# Load policy\n policy = load_policy(\n path_to_cpt=config.cpt_path,\n model_name=config.cpt_name,\n device=config.device,\n env=env,\n )|from gpudrive.networks.late_fusion import NeuralNet\n policy = NeuralNet.from_pretrained(\"daphne-cornelisse/policy_S10_000_02_27\")|}' examples/experimental/viz_rollouts.py \
&& echo 'Modifications to run without GPU' \
&& sed -i 's/device=\"cuda\"/device=\"cpu\"/g' gpudrive/datatypes/observation.py \
&& uv run python examples/experimental/viz_rollouts.py
"
docker run --rm gpudrive:latest /bin/bash -c "$(cat << 'EOF'
#!/bin/bash
set -e
set -x
export DEBIAN_FRONTEND=noninteractive
echo 'Dummy cuda'
ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs/:$LD_LIBRARY_PATH
echo 'Modifications to run without extra data'
sed -i 's|train_path: \"data/processed/training\"|train_path: \"data/processed/examples\"|g' examples/experimental/config/visualization_config.yaml
sed -i '/# Load policy/{N;N;N;N;N;N;s|# Load policy\n policy = load_policy(\n path_to_cpt=config.cpt_path,\n model_name=config.cpt_name,\n device=config.device,\n env=env,\n )|from gpudrive.networks.late_fusion import NeuralNet\n policy = NeuralNet.from_pretrained(\"daphne-cornelisse/policy_S10_000_02_27\")|}' examples/experimental/viz_rollouts.py
echo 'Modifications to run without GPU'
sed -i 's/device=\"cuda\"/device=\"cpu\"/g' gpudrive/datatypes/observation.py
export PYTHONFAULTHANDLER=1
ulimit -c unlimited
echo 'Run smoketest'
/gpudrive/.venv/bin/python examples/experimental/viz_rollouts.py
EOF
)"
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
cmake_policy(VERSION 3.18)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR) # for madrona

include("${CMAKE_CURRENT_SOURCE_DIR}/external/madrona/cmake/madrona_init.cmake")

Expand Down
1 change: 1 addition & 0 deletions src/level_gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ void destroyWorld(Engine &ctx);
{
ctx.get<Position>(road) = pos;
ctx.get<Rotation>(road) = rot;
ctx.get<Velocity>(road) = Velocity{madrona::math::Vector3::zero(), madrona::math::Vector3::zero()};
ctx.get<Scale>(road) = scale;
ctx.get<EntityType>(road) = type;
ctx.get<ObjectID>(road) = objId;
Expand Down