-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv_setup.sh
84 lines (74 loc) · 2.29 KB
/
env_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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Activate the JAX_GPU conda environment
echo "**** Going to env JAX_GPU ****"
source activate JAX_GPU
if ! python3 -c "import jax" &> /dev/null; then
echo "jax is not installed. Installing..."
pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
echo "Jax has been installed successfully."
else
echo "Jax is installed"
fi
python3 -c "import jax; print('GPUs Available: ', jax.devices())"
if ! python3 -c "import matplotlib.pyplot as plt" &>/dev/null; then
echo "matplotlib is not installed. Installing..."
pip3 install matplotlib
echo "matplotlib has been installed successfully."
else
echo "matplotlib is installed"
fi
if ! python3 -c "import tqdm" &>/dev/null; then
echo "tqdm is not installed. Installing..."
pip3 install tqdm
echo "tqdm has been installed successfully."
else
echo "tqdm is installed"
fi
if ! python3 -c "import flax" &> /dev/null; then
echo "flax is not installed. Installing..."
pip3 install flax
echo "flax has been installed successfully."
else
echo "Flax is installed"
fi
if ! python3 -c "import optax" &> /dev/null; then
echo "optax is not installed. Installing..."
pip3 install optax
echo "optax has been installed successfully."
else
echo "optax is installed"
fi
if ! python3 -c "import orbax" &> /dev/null; then
echo "orbax is not installed. Installing..."
pip3 install orbax
echo "orbax has been installed successfully."
else
echo "orbax is installed"
fi
if ! python3 -c "import gymnax" &> /dev/null; then
echo "gymnax is not installed. Installing..."
pip3 install gymnax
echo "gymnax has been installed successfully."
else
echo "gymnax is installed"
fi
if ! python3 -c "import rlax" &> /dev/null; then
echo "rlax is not installed. Installing..."
pip3 install rlax
echo "rlax has been installed successfully."
else
echo "rlax is installed"
fi
if ! python3 -c "import gymnasium" &> /dev/null; then
echo "gymnasium is not installed. Installing..."
pip3 install gymnasium
echo "gymnasium has been installed successfully."
else
echo "gymnasium is installed"
fi
pip3 install gymnax
pip3 install moviepy
pip3 install gymnasium[classic-control]
echo "Env Checked good to go!!"
conda deactivate
sleep 5
clear