dppo/slurm/dev_tests/test_mujoco_clear_cache.sh
ys1087@partner.kit.edu 7e800c9a33 Complete MuJoCo fix and validate hopper fine-tuning
- Add GCC wrapper script to filter Intel compiler flags
- Download missing mujoco-py generated files automatically
- Update installer with comprehensive MuJoCo fixes
- Document complete solution in README and EXPERIMENT_PLAN
- Hopper fine-tuning validated with reward 1415.8471
- All pre-training environments working
- DPPO is now production-ready on HoReKa
2025-08-27 18:27:02 +02:00

46 lines
1.6 KiB
Bash

#!/bin/bash
#SBATCH --job-name=dppo_mujoco_clear
#SBATCH --account=hk-project-p0022232
#SBATCH --partition=dev_accelerated
#SBATCH --gres=gpu:1
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=8
#SBATCH --time=00:30:00
#SBATCH --mem=24G
#SBATCH --output=logs/dppo_mujoco_clear_%j.out
#SBATCH --error=logs/dppo_mujoco_clear_%j.err
module load devel/cuda/12.4
cd $SLURM_SUBMIT_DIR
source .venv/bin/activate
# Apply HoReKa MuJoCo compilation fix first
echo "Applying HoReKa MuJoCo compilation fix..."
python -c "exec(open('fix_mujoco_compilation.py').read()); apply_mujoco_fix(); print('Fix applied successfully')"
# Set MuJoCo environment
export MUJOCO_PY_MUJOCO_PATH=/home/hk-project-robolear/ys1087/.mujoco/mujoco210
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/hk-project-robolear/ys1087/.mujoco/mujoco210/bin:/usr/lib/nvidia
export MUJOCO_GL=egl
# Completely clear mujoco-py build cache and let it regenerate everything
echo "Clearing ALL mujoco-py build cache..."
rm -rf .venv/lib/python3.10/site-packages/mujoco_py/generated/
rm -rf .venv/lib/python3.10/site-packages/mujoco_py/.eggs/
rm -rf .venv/lib/python3.10/site-packages/mujoco_py/build/
rm -rf ~/.mujoco/mujoco-py/
find .venv/lib/python3.10/site-packages/mujoco_py/ -name "*.so" -delete
find .venv/lib/python3.10/site-packages/mujoco_py/ -name "*.pyc" -delete
echo "Testing fresh mujoco-py import with cleared cache..."
python -c "
# Apply fix again in the import context
exec(open('fix_mujoco_compilation.py').read())
apply_mujoco_fix()
print('Importing mujoco_py with clear cache and applied fix...')
import mujoco_py
print('SUCCESS: mujoco_py imported successfully!')
"