Added option to skip mono, torch etc.
@@ -32,8 +32,9 @@ while getopts 'shvai' x; do
This script will install, build, test, and package Malmo.
-s Use static linking of Boost (will also build Boost if building)
-v Verbose output (very verbose!)
- -a Build ALE support
+ -a Build ALE support (not compatible with -l)
-i Install only - downloads Malmo, rather than building it - involves fewer dependencies
+ -l (For installation-only): Light-weight install - skip torch, mono, lua and ALE
"
exit 2
;;
@@ -49,9 +50,17 @@ This script will install, build, test, and package Malmo.
i)
INSTALL_ONLY=1
;;
+ l)
+ LIGHT_WEIGHT=1
+ ;;
esac
done
+if [ $LIGHT_WEIGHT ] && [ -z $INSTALL_ONLY ]; then
+ echo "Can't strip out Mono, Torch and Lua if you are building."
+ exit 1
+fi
+
if [ $VERBOSE_MODE ]; then
exec 4>&2 3>&1
else
@@ -203,6 +212,7 @@ if [ $INSTALL_TORCH ]; then
fi
# Install Mono:
+if [ -z "$LIGHT_WEIGHT" ]; then
echo "Installing mono..."
{
if [ "$DIST" == 'debian' ] || [ "$DIST" == 'ubuntu' ]; then
@@ -230,6 +240,7 @@ if [ $result -ne 0 ]; then
echo "Failed to install Mono."
exit 1
fi
+fi
# Build Boost:
if [ -z "$INSTALL_ONLY" ] && [ "$STATIC_BOOST" ]; then
@@ -286,12 +297,14 @@ if [ -z "$INSTALL_ONLY" ]; then
fi
# Install lua dependencies:
+if [ -z "$LIGHT_WEIGHT" ]; then
echo "Installing lua dependencies:"
sudo apt-get -y install luarocks | tee /home/$USER/build_logs/install_deps_lua.log >&3
sudo luarocks install luasocket | tee -a /home/$USER/build_logs/install_deps_lua.log >&3
+fi
# Install ALE:
-if [ $BUILD_ALE ]; then
+if [ "$BUILD_ALE" ] && [ -z "$LIGHT_WEIGHT" ]; then
echo "Building ALE..."
{
git clone https://github.com/mgbellemare/Arcade-Learning-Environment.git /home/$USER/ALE
