install_prereqs.sh 923 Bytes
Newer Older
Shucai Xiao's avatar
Shucai Xiao committed
1
2
3
4
#!/bin/bash
#
# Build MIGraphX prerequisites for docker container

5
6
set -e

7
8
9
10
11
12
13
14
15
export LC_ALL=C.UTF-8
export LANG=C.UTF-8


# Need pip3 and Python headers to build dependencies
apt update && apt install -y python3-pip python3-dev cmake rocm-cmake rocblas miopen-hip openmp-extras

# Needed for cmake to build various pip packages
pip3 install setuptools wheel
Shucai Xiao's avatar
Shucai Xiao committed
16
17
18
19

# install rbuild to build dependencies
pip3 install https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz

20

Shucai Xiao's avatar
Shucai Xiao committed
21
22
23
24
PREFIX=/usr/local
REQ_FILE_DIR=""
if [ "$#" -ge 2 ]; then
  PREFIX=$1
25
  cd $2
Shucai Xiao's avatar
Shucai Xiao committed
26
27
28
29
elif [ "$#" -eq 1 ]; then
  PREFIX=$1
fi

kahmed10's avatar
kahmed10 committed
30
echo "Dependencies are installed at $PREFIX"
Shucai Xiao's avatar
Shucai Xiao committed
31

32
33
# Install deps with rbuild
rbuild prepare -d $PREFIX -s develop
Shucai Xiao's avatar
Shucai Xiao committed
34

Shucai Xiao's avatar
Shucai Xiao committed
35
36
# install onnx package for unit tests
pip3 install onnx==1.8.1 numpy==1.18.5 typing==3.7.4 pytest==6.0.1 packaging==16.8
Shucai Xiao's avatar
Shucai Xiao committed
37

kahmed10's avatar
kahmed10 committed
38
39
# pin version of protobuf in Python for onnx runtime unit tests
pip3 install protobuf==3.20.0