Files
audio-driven-face-animation/bash/setup_conda.sh
T
Łukasz Zalewski d45f604bc8 Release/1.0 (#156)
* update to Hydra 1.1
* add bash folder with scripts for conda setup and run scheduling
* add saving seed in `log_hyperparameters()` method
* redesign Dockerfile to make it weight less
* add `test_after_training` parameter to config
* add inheritance to trainer configs
* remove forcing ddp-friendly configuration
* refactor tests
* remove conda_env_gpu.yaml
* remove default langage version from pre-commit config
* add mnist datamodule unit test
* rename test folder from 'smoke' to 'shell'
* remove wandb import from utils.py
* change 'use_artifact' to 'log_artifact' in wandb callbacks
* add rank zero decorator to wandb callbacks
* add dumping rich tree config to file
* get rid of `=` character in ckpt names
* update requirements.txt
* update LICENSE
* update README.md
2021-07-21 03:37:45 +02:00

34 lines
1.0 KiB
Bash

#!/bin/bash
# Run from root folder with: bash bash/setup_conda.sh
# check if conda is installed
if ! command -v conda &> /dev/null
then
echo "The 'conda' command could not be found. Exiting..."
exit
fi
# This line is needed for enabling conda env activation
source ~/miniconda3/etc/profile.d/conda.sh
# Configure conda env
read -rp "Enter environment name: " env_name
read -rp "Enter python version (recommended '3.8') " python_version
read -rp "Enter cuda version (recommended '10.2', or 'none' for CPU only): " cuda_version
read -rp "Enter pytorch version (recommended '1.8.1'): " pytorch_version
# Create conda env
conda create -y -n "$env_name" python="$python_version"
conda activate "$env_name"
# Install pytorch
if [ "$cuda_version" == "none" ]; then
conda install -y pytorch=$pytorch_version torchvision torchaudio cpuonly -c pytorch
else
conda install -y pytorch=$pytorch_version torchvision torchaudio cudatoolkit=$cuda_version -c pytorch
fi
echo "\n"
echo "To activate this environment, use:"
echo "conda activate $env_name"