-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux_setup.sh
48 lines (35 loc) · 1.33 KB
/
linux_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Exit on error
set -e
# Update system packages
echo "Updating system packages..."
sudo apt update
# Install packages (e.g., git, vim, etc.)
echo "Installing required packages..."
sudo apt install -y build-essential clang gcc g++ cmake libssl-dev libssh-dev htop libffi-dev
# Download and Install Anaconda
echo "Installing Anaconda..."
# Set the Anaconda version
ANACONDA_VERSION="2023.07-2"
# Download Anaconda installer
wget https://repo.anaconda.com/archive/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh
# Install Anaconda silently (-b)
bash Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh -b -p $HOME/anaconda3
# Add Anaconda to PATH
echo 'export PATH="$HOME/anaconda3/bin:$PATH"' >> $HOME/.bashrc
# Activate the changes to .bashrc
source $HOME/.bashrc
# Set up libmamba as the default solver for conda
echo "Setting libmamba as the default solver for conda..."
conda update -n base conda -y
conda install -n base conda-libmamba-solver -y
conda config --set solver libmamba -y
# install py310 environment
PY310_ENV_YML="https://raw.githubusercontent.com/tdrobbin/utils/main/py310-environment.yml"
echo "Installing py310 env:"
echo ${PY310_ENV_YML}
conda env create --file ${PY310_ENV_YML} -y
# Print success message
echo "Setup completed successfully."
# Clean up the Anaconda installer
# rm Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh