Lab 8 Teacher Notes
===================

Tested working setup discovered during preparation:
- SLURM partition: dgxa100
- GPU: NVIDIA A100-SXM4-80GB
- Apptainer with --nv
- PyTorch image: pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
- Python: 3.7.11
- Isaac Gym Preview 4
- Legged Gym
- Task: pupper_flat

Important fixes that were required:
1. Isaac Gym must be imported before torch.
2. The gymtorch extension needs a compiler. A conda_tools environment was used.
3. crypt.h may be missing; a local include fallback can be placed in:
   ~/pupper_lab8/local_include/crypt.h
4. conda_tools/lib must come before /opt/conda/lib in LD_LIBRARY_PATH.
5. LD_PRELOAD is used for libstdc++.so.6 and libgcc_s.so.1.
6. Variables TASK, NUM_ENVS, MAX_ITERATIONS and RUN_NAME must be passed into Apptainer with APPTAINERENV_.

Observed working runs:
- NUM_ENVS=128, MAX_ITERATIONS=10 completed.
- NUM_ENVS=512, MAX_ITERATIONS=50 completed.
- Initial reward stayed zero because the Pupper reward TODO functions returned 0.

Student-facing aim:
Students should not repair HPC. The real lab task is reward shaping:
- _reward_base_height
- _reward_forward_velocity
- _reward_torques
