|
48 | 48 | run: |
|
49 | 49 | wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
|
50 | 50 | bash ~/miniconda.sh -b -p $HOME/miniconda -u
|
| 51 | + conda update -n base -c defaults -y conda |
51 | 52 | - name: setup Path
|
52 | 53 | run: |
|
53 | 54 | echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
|
|
62 | 63 | - name: check python version
|
63 | 64 | run: |
|
64 | 65 | conda run -n build_binary python --version
|
65 |
| - - name: Install C/C++ compilers |
66 |
| - run: | |
67 |
| - sudo yum install -y gcc gcc-c++ |
| 66 | + - name: Install gcc |
| 67 | + run: | |
| 68 | + conda install -n build_binary -c conda-forge -y gxx_linux-64=11.4.0 sysroot_linux-64=2.17 |
| 69 | + echo "[INSTALL] Setting the C/C++ compiler symlinks ..." |
| 70 | + cc_path=$(conda run -n build_binary printenv CC) |
| 71 | + cxx_path=$(conda run -n build_binary printenv CXX) |
| 72 | + ln -sf "${cc_path}" "$(dirname "$cc_path")/cc" |
| 73 | + ln -sf "${cc_path}" "$(dirname "$cc_path")/gcc" |
| 74 | + ln -sf "${cxx_path}" "$(dirname "$cxx_path")/c++" |
| 75 | + ln -sf "${cxx_path}" "$(dirname "$cxx_path")/g++" |
| 76 | +
|
| 77 | + conda_prefix=$(conda run -n build_binary printenv CONDA_PREFIX) |
| 78 | + echo "[TEST] Enumerating libstdc++.so files ..." |
| 79 | + all_libcxx_libs=$(find "${conda_prefix}/lib" -type f -name 'libstdc++.so*' -print | sort) |
| 80 | + for f in $all_libcxx_libs; do |
| 81 | + echo "$f"; |
| 82 | + objdump -TC "$f" | grep GLIBCXX_ | sed 's/.*GLIBCXX_\([.0-9]*\).*/GLIBCXX_\1/g' | sort -Vu | cat |
| 83 | + echo "" |
| 84 | + done |
| 85 | +
|
| 86 | + echo "[TEST] Appending the Conda-installed libstdc++ to LD_PRELOAD ..." |
| 87 | + current_value=$(conda run -n build_binary printenv LD_PRELOAD) |
| 88 | + conda env config vars set -n build_binary LD_PRELOAD="${current_value:+${current_value}:}${all_libcxx_libs[0]}" |
68 | 89 | - name: Install PyTorch and CUDA
|
69 | 90 | shell: bash
|
70 | 91 | run: |
|
|
0 commit comments