conda-forge / cupy-feedstock

A conda-smithy repository for cupy.
BSD 3-Clause "New" or "Revised" License
5 stars 23 forks source link

cupy activate script tests an unset shell variable #68

Closed calebmarchent closed 4 years ago

calebmarchent commented 4 years ago

Issue:

cupy activate script tests an unbound shell variable:

$ conda create -n test_cupy_path python=3.6 cupy==7.8.0
$ set -u
$ conda activate test_cupy_path
-bash: CUDA_PATH: unbound variable

As I use set -u to mitigate build, test and release script bugs; it would be nice if we can accept one of the fixes for this:

https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash


Environment (conda list):

``` $ conda list # packages in environment at /home/ubuntu/miniconda3/envs/test_cupy_path: # # Name Version Build Channel _libgcc_mutex 0.1 main blas 1.0 mkl ca-certificates 2020.7.22 0 certifi 2020.6.20 py36_0 cudatoolkit 10.2.89 hfd86e86_1 cudnn 7.6.5 cuda10.2_0 cupy 7.8.0 py36h4445f8d_0 conda-forge fastrlock 0.4 py36he6710b0_0 intel-openmp 2020.2 254 ld_impl_linux-64 2.33.1 h53a641e_7 libedit 3.1.20191231 h14c3975_1 libffi 3.3 he6710b0_2 libgcc-ng 9.1.0 hdf63c60_0 libstdcxx-ng 9.1.0 hdf63c60_0 mkl 2020.2 256 mkl-service 2.3.0 py36he904b0f_0 mkl_fft 1.1.0 py36h23d657b_0 mkl_random 1.1.1 py36h0573a6f_0 nccl 2.7.8.1 hc6a2c23_0 conda-forge ncurses 6.2 he6710b0_1 numpy 1.19.1 py36hbc911f0_0 numpy-base 1.19.1 py36hfa32c7d_0 openssl 1.1.1g h7b6447c_0 pip 20.2.2 py36_0 python 3.6.12 hcff3b4d_2 python_abi 3.6 1_cp36m conda-forge readline 8.0 h7b6447c_0 setuptools 49.6.0 py36_0 six 1.15.0 py_0 sqlite 3.33.0 h62c20be_0 tk 8.6.10 hbc83047_0 wheel 0.35.1 py_0 xz 5.2.5 h7b6447c_0 zlib 1.2.11 h7b6447c_3 ```


Details about conda and system ( conda info ):

``` $ conda info active environment : test_cupy_path active env location : /home/ubuntu/miniconda3/envs/test_cupy_path shell level : 1 user config file : /home/ubuntu/.condarc populated config files : /home/ubuntu/.condarc conda version : 4.8.3 conda-build version : not installed python version : 3.8.3.final.0 virtual packages : __glibc=2.27 base environment : /home/ubuntu/miniconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch package cache : /home/ubuntu/miniconda3/pkgs /home/ubuntu/.conda/pkgs envs directories : /home/ubuntu/miniconda3/envs /home/ubuntu/.conda/envs platform : linux-64 user-agent : conda/4.8.3 requests/2.23.0 CPython/3.8.3 Linux/5.4.0-42-generic ubuntu/18.04.5 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False ```