-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathGurobi-9.1.2_install
More file actions
executable file
·41 lines (30 loc) · 945 Bytes
/
Gurobi-9.1.2_install
File metadata and controls
executable file
·41 lines (30 loc) · 945 Bytes
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
#!/bin/bash
# This script installs Gurobi Optimizer 9.1.2
# Brian Alston October 2017
# Updated for Gurobi 8.1.1 October 2019
# Updated for Gurobi 9.1.2 October 2021
VERSION=${VERSION:-9.1.2}
INSTALL_PREFIX=${INSTALL_PREFIX:-/shared/ucl/apps/Gurobi}
SRC_ARCHIVE=${SRC_ARCHIVE:-https://packages.gurobi.com/9.1/gurobi${VERSION}_linux64.tar.gz}
MD5=${MD5:-022f454faaa37207b3f2526a1abf928f}
set -e
startDir=`pwd`
mkdir -p /dev/shm/Gurobi
temp_dir=`mktemp -d -p /dev/shm/Gurobi`
cd $temp_dir
wget $SRC_ARCHIVE
ARCHIVE=`basename $SRC_ARCHIVE`
CHECKSUM=`md5sum ${ARCHIVE}| awk '{print $1}'`
if [ "$MD5" == "$CHECKSUM" ]
then
# Unpack the archive in the correct location.
mkdir -p $INSTALL_PREFIX
cd $INSTALL_PREFIX
tar xvzf $temp_dir/$ARCHIVE
# Set up client license file for UCL.
echo "TOKENSERVER=lic-rhel01.ad.ucl.ac.uk" > gurobi.lic
else
echo "Hash mismatch."
echo "Expected: $MD5"
echo "Got: $CHECKSUM"
fi