diff --git a/.github/unittest/windows_optdepts/scripts/install.sh b/.github/unittest/windows_optdepts/scripts/install.sh index f13b83a0be0..f6b69e3121a 100644 --- a/.github/unittest/windows_optdepts/scripts/install.sh +++ b/.github/unittest/windows_optdepts/scripts/install.sh @@ -9,8 +9,7 @@ set -ex this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -eval "$(./conda/Scripts/conda.exe 'shell.bash' 'hook')" -conda activate ./env +conda activate torchrl # TODO, refactor the below logic to make it easy to understand how to get correct cuda_version. if [ "${CU_VERSION:-}" == cpu ] ; then diff --git a/.github/unittest/windows_optdepts/scripts/run_test.sh b/.github/unittest/windows_optdepts/scripts/run_test.sh index 351eb4bfef7..739d0b25e30 100644 --- a/.github/unittest/windows_optdepts/scripts/run_test.sh +++ b/.github/unittest/windows_optdepts/scripts/run_test.sh @@ -2,8 +2,7 @@ set -e -eval "$(./conda/Scripts/conda.exe 'shell.bash' 'hook')" -conda activate ./env +conda activate torchrl this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" source "$this_dir/set_cuda_envs.sh" diff --git a/.github/unittest/windows_optdepts/scripts/setup_env.sh b/.github/unittest/windows_optdepts/scripts/setup_env.sh index 84f709d6537..09d6f1f0253 100644 --- a/.github/unittest/windows_optdepts/scripts/setup_env.sh +++ b/.github/unittest/windows_optdepts/scripts/setup_env.sh @@ -9,31 +9,17 @@ set -e this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" root_dir="$(git rev-parse --show-toplevel)" -conda_dir="${root_dir}/conda" env_dir="${root_dir}/env" cd "${root_dir}" -# 1. Install conda at ./conda -if [ ! -d "${conda_dir}" ]; then - printf "* Installing conda\n" - export tmp_conda="$(echo $conda_dir | tr '/' '\\')" - export miniconda_exe="$(echo $root_dir | tr '/' '\\')\\miniconda.exe" - curl --output miniconda.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O - "$this_dir/install_conda.bat" - unset tmp_conda - unset miniconda_exe -fi - -eval "$(${conda_dir}/Scripts/conda.exe 'shell.bash' 'hook')" - # 2. Create test environment at ./env printf "* Creating a test environment\n" -conda create --prefix "${env_dir}" -y python="$PYTHON_VERSION" +conda init bash +conda create -n torchrl -y python="$PYTHON_VERSION" printf "* Activating the environment" -conda deactivate -conda activate "${env_dir}" +conda activate torchrl printf "Python version" echo $(which python)