Unverified Commit b1be6bb4 authored by David Hoeller's avatar David Hoeller Committed by GitHub

Fixes conda installation using `isaaclab.sh` script (#651)

# Description

Fixes Isaac Lab conda installation  

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 26a81a6a
...@@ -52,15 +52,15 @@ extract_isaacsim_path() { ...@@ -52,15 +52,15 @@ extract_isaacsim_path() {
# extract the python from isaacsim # extract the python from isaacsim
extract_python_exe() { extract_python_exe() {
# default to python in the kit # check if using conda
local python_exe=${ISAACLAB_PATH}/_isaac_sim/python.sh if ! [[ -z "${CONDA_PREFIX}" ]]; then
# if default python is not available, check if conda is activated # use conda python
local python_exe=${CONDA_PREFIX}/bin/python
else
# use kit python
local python_exe=${ISAACLAB_PATH}/_isaac_sim/python.sh
if [ ! -f "${python_exe}" ]; then if [ ! -f "${python_exe}" ]; then
# check if using conda
if ! [[ -z "${CONDA_PREFIX}" ]]; then
# use conda python
local python_exe=${CONDA_PREFIX}/bin/python
else
# note: we need to check system python for cases such as docker # note: we need to check system python for cases such as docker
# inside docker, if user installed into system python, we need to use that # inside docker, if user installed into system python, we need to use that
# otherwise, use the python from the kit # otherwise, use the python from the kit
...@@ -153,9 +153,10 @@ setup_conda_env() { ...@@ -153,9 +153,10 @@ setup_conda_env() {
# check if we have _isaac_sim directory -> if so that means binaries were installed. # check if we have _isaac_sim directory -> if so that means binaries were installed.
# we need to setup conda variables to load the binaries # we need to setup conda variables to load the binaries
local isaacsim_setup_conda_env_script=${ISAACLAB_PATH}/_isaac_sim/setup_conda_env.sh local isaacsim_setup_conda_env_script=${ISAACLAB_PATH}/_isaac_sim/setup_conda_env.sh
if [ -f "${isaacsim_setup_conda_env_script}" ]; then if [ -f "${isaacsim_setup_conda_env_script}" ]; then
# add variables to environment during activation # add variables to environment during activation
printf '' \ printf '%s\n' \
'# for Isaac Sim' \ '# for Isaac Sim' \
'source '${isaacsim_setup_conda_env_script}'' \ 'source '${isaacsim_setup_conda_env_script}'' \
'' >> ${CONDA_PREFIX}/etc/conda/activate.d/setenv.sh '' >> ${CONDA_PREFIX}/etc/conda/activate.d/setenv.sh
...@@ -182,7 +183,7 @@ setup_conda_env() { ...@@ -182,7 +183,7 @@ setup_conda_env() {
# check if we have _isaac_sim directory -> if so that means binaries were installed. # check if we have _isaac_sim directory -> if so that means binaries were installed.
if [ -f "${isaacsim_setup_conda_env_script}" ]; then if [ -f "${isaacsim_setup_conda_env_script}" ]; then
# add variables to environment during activation # add variables to environment during activation
printf '' \ printf '%s\n' \
'# for Isaac Sim' \ '# for Isaac Sim' \
'unset CARB_APP_PATH' \ 'unset CARB_APP_PATH' \
'unset EXP_PATH' \ 'unset EXP_PATH' \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment