@@ -20,6 +20,8 @@ export TF_CPP_MIN_LOG_LEVEL=0
2020export BATCHED_PIPE_TIMEOUT=60
2121export TD_GET_DEFAULTS_TO_NONE=1
2222export OMNI_KIT_ACCEPT_EULA=yes
23+ export PIP_DISABLE_PIP_VERSION_CHECK=1
24+ export PYTHONNOUSERSITE=1
2325
2426nvidia-smi
2527
@@ -46,36 +48,62 @@ eval "$(${conda_dir}/bin/conda shell.bash hook)"
4648conda create --prefix ${env_dir} python=3.10 -y
4749conda activate ${env_dir}
4850
51+ # Set LD_LIBRARY_PATH to prioritize conda environment libraries early
52+ export LD_LIBRARY_PATH=${lib_dir} :${LD_LIBRARY_PATH:- }
53+
54+ # Ensure libexpat is at the correct version BEFORE installing other packages
55+ conda install -c conda-forge expat -y
56+
57+ # Force the loader to pick conda's libexpat over the system one
58+ if [ -f " ${lib_dir} /libexpat.so.1" ]; then
59+ export LD_PRELOAD=" ${lib_dir} /libexpat.so.1:${LD_PRELOAD:- } "
60+ elif [ -f " ${lib_dir} /libexpat.so" ]; then
61+ export LD_PRELOAD=" ${lib_dir} /libexpat.so:${LD_PRELOAD:- } "
62+ fi
63+
64+ # Quick diagnostic to confirm which expat is resolved by pyexpat
65+ PYEXPAT_SO=$( python - << 'PY '
66+ import importlib.util
67+ spec = importlib.util.find_spec('pyexpat')
68+ print(spec.origin)
69+ PY
70+ )
71+ echo " * pyexpat module: ${PYEXPAT_SO} "
72+ ldd " ${PYEXPAT_SO} " | grep -i expat || true
73+
74+ # Reinstall Python to ensure it links against the correct expat
75+ conda install --force-reinstall python=3.10 -y
76+
4977# Pin pytorch to 2.5.1 for IsaacLab
5078conda install pytorch==2.5.1 torchvision==0.20.1 pytorch-cuda=12.4 -c pytorch -c nvidia -y
5179
52- conda run -p ${env_dir} pip install --upgrade pip
53- conda run -p ${env_dir} pip install ' isaacsim[all,extscache]==4.5.0' --extra-index-url https://pypi.nvidia.com
80+ python -m pip install --upgrade pip --disable-pip-version-check
81+ python -m pip install ' isaacsim[all,extscache]==4.5.0' --extra-index-url https://pypi.nvidia.com --disable-pip-version-check
5482conda install conda-forge::" cmake>3.22" -y
5583
5684git clone https://github.com/isaac-sim/IsaacLab.git
5785cd IsaacLab
58- conda run -p ${env_dir} ./isaaclab.sh --install sb3
86+ ./isaaclab.sh --install sb3
5987cd ../
6088
6189# install tensordict
6290if [[ " $RELEASE " == 0 ]]; then
6391 conda install " anaconda::cmake>=3.22" -y
64- conda run -p ${env_dir} python -m pip install " pybind11[global]"
65- conda run -p ${env_dir} python -m pip install git+https://github.com/pytorch/tensordict.git
92+ python -m pip install " pybind11[global]" --disable-pip-version-check
93+ python -m pip install git+https://github.com/pytorch/tensordict.git --disable-pip-version-check
6694else
67- conda run -p ${env_dir} python -m pip install tensordict
95+ python -m pip install tensordict --disable-pip-version-check
6896fi
6997
7098# smoke test
71- conda run -p ${env_dir} python -c " import tensordict"
99+ python -c " import tensordict"
72100
73101printf " * Installing torchrl\n"
74- conda run -p ${env_dir} python -m pip install -e . --no-build-isolation
75- conda run -p ${env_dir} python -c " import torchrl"
102+ python -m pip install -e . --no-build-isolation --disable-pip-version-check
103+ python -c " import torchrl"
76104
77105# Install pytest
78- conda run -p ${env_dir} python -m pip install pytest pytest-cov pytest-mock pytest-instafail pytest-rerunfailures pytest-error-for-skips pytest-asyncio
106+ python -m pip install pytest pytest-cov pytest-mock pytest-instafail pytest-rerunfailures pytest-error-for-skips pytest-asyncio --disable-pip-version-check
79107
80108# Run tests
81- conda run -p ${env_dir} python -m pytest test/test_libs.py -k isaac -s
109+ python -m pytest test/test_libs.py -k isaac -s
0 commit comments