forked from geoelements/gns-inverse-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_venv.sh
36 lines (26 loc) · 805 Bytes
/
build_venv.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
#!/bin/bash
module reset
# create env
# ---------
source module.sh
python3 -m virtualenv venv
source venv/bin/activate
which python
python -m pip install --upgrade pip
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.0.0+cu118.html
python -m pip install -r requirements.txt
# test env
# --------
echo 'which python -> venv'
which python
echo 'test_pytorch.py -> random tensor'
python test/test_pytorch.py
echo 'test_pytorch_cuda_gpu.py -> True if GPU'
python test/test_pytorch_cuda_gpu.py
echo 'test_torch_geometric.py -> no retun if import sucessful'
python test/test_torch_geometric.py
# Clean up
# --------
#deactivate
#rm -r venv