-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/NexaAI/nexaai-sdk-cpp into …
…david/installation
- Loading branch information
Showing
4 changed files
with
34 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname "${BASH_SOURCE[0]}")" | ||
|
||
if [[ "$(pwd)" =~ " " ]]; then echo This script relies on Miniconda which can not be silently installed under a path with spaces. && exit; fi | ||
|
||
# deactivate existing conda envs as needed to avoid conflicts | ||
{ conda deactivate && conda deactivate && conda deactivate; } 2> /dev/null | ||
|
||
# config | ||
CONDA_ROOT_PREFIX="$(pwd)/installer_files/conda" | ||
INSTALL_ENV_DIR="$(pwd)/installer_files/env" | ||
|
||
# environment isolation | ||
export PYTHONNOUSERSITE=1 | ||
unset PYTHONPATH | ||
unset PYTHONHOME | ||
export CUDA_PATH="$INSTALL_ENV_DIR" | ||
export CUDA_HOME="$CUDA_PATH" | ||
|
||
# activate env | ||
source $CONDA_ROOT_PREFIX/etc/profile.d/conda.sh | ||
conda activate $INSTALL_ENV_DIR | ||
exec bash --norc |