Last active
September 21, 2022 09:13
-
-
Save amrakm/6b7afb519cc48b7d2a074a2bc3f2deea to your computer and use it in GitHub Desktop.
create conda env from shell script
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
# # create a file `create_rd37_env.sh` and add this snippet to it | |
# get conda path using `which conda` | |
/home/ec2-user/anaconda3/condabin/conda init bash | |
conda create -y --name rd37 python=3.7 | |
conda activate rd37 | |
conda install -y ipykernel | |
python -m ipykernel install --user --name rd37 --display-name "rd37" | |
conda install -y -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/ | |
mkdir -p $CONDA_PREFIX/etc/conda/activate.d | |
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh | |
pip install --no-input --upgrade pip | |
pip install --no-input pandas awswrangler ftfy regex tqdm s3fs redis Pillow torch matplotlib torchvision numpy sentence-transformers | |
# #then | |
# bash -l create_rd39_env.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment