-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_python.sh
More file actions
executable file
·68 lines (56 loc) · 2.11 KB
/
install_python.sh
File metadata and controls
executable file
·68 lines (56 loc) · 2.11 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
# ---------------------------------------------------------
# Cmd line args
# ---------------------------------------------------------
ENV_NAME=py3env
ENV_PYTHON=3.14
# Check if parameters are provided
if [ ! -z "$1" ]; then
ENV_NAME="$1"
fi
if [ ! -z "$2" ]; then
ENV_PYTHON="$2"
fi
# ---------------------------------------------------------
# miniconda
# ---------------------------------------------------------
# if [ ! -f "/home/$USER/miniconda3/etc/profile.d/conda.sh" ]; then
# echo "Installing Fresh miniconda"
# CONDA_FILE=miniconda.sh
# #wget https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh $CONDA_FILE
# wget -O $CONDA_FILE https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# chmod +x $CONDA_FILE
# ./$CONDA_FILE -b
# rm ~/$CONDA_FILE
# fi
# source ~/miniconda3/etc/profile.d/conda.sh
# https://rapids.ai/start.html#rapids-release-selector
# conda create -n $ENV_NAME -c conda-forge \
# python=$ENV_PYTHON -y
# ---------------------------------------------------------
# uv
# ---------------------------------------------------------
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install $ENV_PYTHON
uv venv /nas/miniconda3/envs/$ENV_NAME --python $ENV_PYTHON # miniconda path for backward compatibility
python --version
echo "Building env"
# site libs
ln -s /nas/settings/site-packages.pth /nas/miniconda3/envs/$ENV_NAME/lib/python${ENV_PYTHON}/site-packages/site-packages.pth
# default installs
source /nas/miniconda3/envs/$ENV_NAME/bin/activate
uv pip install dvc dvc-azure chardet
uv pip install pyAesCrypt gpustat
# ---------------------------------------------------------
# User libs
# ---------------------------------------------------------
uv pip install numpy pandas numba pyarrow matplotlib seaborn jupyterlab
# ---------------------------------------------------------
# Fold
# ---------------------------------------------------------
deactivate
# ---------------------------------------------------------
# Tools
# ---------------------------------------------------------
uv tool install gpustat
uv tool install dvc