Created
September 7, 2023 10:14
-
-
Save renxida/4953f1030aee8a93eeb47f9c9a8ea940 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Install Miniconda | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | |
bash miniconda.sh -b -p $HOME/miniconda | |
rm miniconda.sh | |
# Add Miniconda to PATH | |
export PATH="$HOME/miniconda/bin:$PATH" | |
# Initialize Conda | |
source $HOME/miniconda/bin/activate | |
# Install mamba into the base environment | |
conda install -c conda-forge mamba -y | |
# Use a heredoc to create the environment.yml file | |
cat <<EOL > environment.yml | |
name: tensorml | |
channels: | |
- defaults | |
- conda-forge | |
- pytorch | |
dependencies: | |
- python=3.8 | |
- pip | |
- pip: | |
- transformers==4.9.2 | |
- einops | |
- accelerate | |
- torch | |
- torchvision | |
- torchaudio | |
- cudatoolkit=11.0 | |
- fastapi | |
- uvicorn # web server | |
EOL | |
# Use mamba to create the environment from the environment.yml file | |
mamba env create -f environment.yml | |
echo "Installation complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment