-
-
Notifications
You must be signed in to change notification settings - Fork 984
/
Copy pathinstall.sh
executable file
·40 lines (33 loc) · 1.1 KB
/
install.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
#!/usr/bin/env bash
# Copyright Contributors to the Pyro project.
#
# SPDX-License-Identifier: Apache-2.0
set -xe
pip install --upgrade pip
pip install notebook ipywidgets matplotlib
# 1. Install PyTorch
# Use conda package if pytorch_branch = 'release'.
# Else, install from source, using git branch `pytorch_branch`
if [ ${pytorch_branch} = "release" ]
then
conda install -y pytorch torchvision -c pytorch
if [ ${cuda} = 1 ]; then conda install -y cuda90 -c pytorch; fi
else
conda install -y numpy pyyaml mkl mkl-include setuptools cmake cffi typing
conda install -c mingfeima mkldnn
if [ ${cuda} = 1 ]; then conda install -y cuda90 -c pytorch; fi
git clone --recursive https://github.com/pytorch/pytorch.git
pushd pytorch && git checkout ${pytorch_branch}
python setup.py install
popd
fi
# 2. Install Pyro
# Use pypi wheel if pyro_branch = 'release'.
# Else, install from source, using git branch `pyro_branch`
if [ ${pyro_branch} = "release" ]
then
pip install pyro-ppl
else
git clone ${pyro_git_url}
(cd pyro && git checkout ${pyro_branch} && pip install .[dev])
fi