forked from bguan/pylele
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_conda.sh
executable file
·36 lines (25 loc) · 956 Bytes
/
install_conda.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
#!/usr/bin/env bash
# CONDA_REPO=https://repo.anaconda.com/archive/
# CONDA=Anaconda3-2024.02-1-Linux-x86_64.sh # based on python 3.11
# CONDA_BIN_DIR=~/anaconda3/bin
CONDA_REPO=https://repo.anaconda.com/miniconda/
CONDA=Miniconda3-py311_24.7.1-0-Linux-x86_64.sh # miniconda python 3.11
CONDA_BIN_DIR=~/miniconda3/bin
PYTHON=$CONDA_BIN_DIR/python
# get and install conda
wget ${CONDA_REPO}${CONDA}
chmod +x $CONDA
./$CONDA -b
# check python version
$PYTHON --version
# get pip
# GET_PIP=get-pip.py
# wget https://bootstrap.pypa.io/$GET_PIP
# $PYTHON $GET_PIP
# install pip through conda
conda install pip
# install pip requirements
$PYTHON -m pip install -r requirements.txt
# install requirements with conda or pip
# https://stackoverflow.com/questions/65753317/strategies-to-convert-requirements-txt-to-a-conda-environment-file
# while read requirement; do conda install --yes $requirement || pip install $requirement; done < requirements.txt