Environment Setup#
This chapter describes how to get set up quickly in a new (remote) computing environment.
Create an ~/env
directory to store files related to the computing
environment:
mkdir ~/env
Create an ~/env/bin
directory to store binaries:
mkdir ~/env/bin
This directory will be added to the PATH
environment variable by ~/.profile
in the config files.
Conda#
Miniconda#
Download the Miniconda install script:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Run the script to install Miniconda to the ~/env
directory:
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh
Add the conda-forge
to the channels list:
conda config --prepend channels conda-forge
Tip
In the command above, you can use --append
instead of --prepend
to give
conda-forge lower priority than the official Anaconda channels.
Mamba#
Install mamba, a faster alternative to conda, in the base
environment:
conda install -n base mamba
Note
You don’t want to put programs into your base environment, though.
This is because the base
environment is where conda itself is
installed, so if it breaks, your entire conda install breaks.
Nevertheless, mamba must be installed in base
in order to install packages to
the correct directories.
The main
Environment#
Create and activate the main
environment:
conda create -n main
conda activate main
The main
environment is where you should install tools applicable to almost
all projects. For instance, tmux and stow:
mamba install tmux stow
And modern shell tools:
mamba install exa fd-find ripgrep sd
Note
Modern shell tools replace older tools that have been standards for decades. They improve usability and efficiency, and add new features. My preferred modern shell tools are:
Optionally, install Python and R as well:
# Python & R
mamba install python ipython jupytext pandas
mamba install r
Tip
You can add conda activate main
to ~/.bashrc
to make the shell activate
this environment by default on login.
Config Files#
Clone the dotfiles-remote repo:
git clone https://github.com/nick-ulle/dotfiles-remote.git
Neovim#
Get the Neovim AppImage and make a softlink in ~/env/bin
to the
executable.
For shorter deployments, just alias nvim
to vim
in ~/.bashrc
.