-
Notifications
You must be signed in to change notification settings - Fork 488
/
Copy pathinstall_fbgemm.sh
30 lines (26 loc) · 1.15 KB
/
install_fbgemm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
echo "CU_VERSION: ${CU_VERSION}"
echo "CHANNEL: ${CHANNEL}"
echo "CONDA_ENV: ${CONDA_ENV}"
if [[ $CU_VERSION = cu* ]]; then
# Setting LD_LIBRARY_PATH fixes the runtime error with fbgemm_gpu not
# being able to locate libnvrtc.so
echo "[NOVA] Setting LD_LIBRARY_PATH ..."
conda env config vars set -p ${CONDA_ENV} \
LD_LIBRARY_PATH="/usr/local/lib:${CUDA_HOME}/lib64:${CONDA_ENV}/lib:${LD_LIBRARY_PATH}"
else
echo "[NOVA] Setting LD_LIBRARY_PATH ..."
conda env config vars set -p ${CONDA_ENV} \
LD_LIBRARY_PATH="/usr/local/lib:${CONDA_ENV}/lib:${LD_LIBRARY_PATH}"
fi
if [ "$CHANNEL" = "nightly" ]; then
${CONDA_RUN} pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/"$CU_VERSION"
elif [ "$CHANNEL" = "test" ]; then
${CONDA_RUN} pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/test/"$CU_VERSION"
fi
conda run -n "${CONDA_ENV}" pip install importlib-metadata