I’m attempting to install and configure snap-python in a reusable deployment script on a centos 6 node. I use pip to install and wheel jpy successfully from the latest git repository. A problem arises when snappy-conf runs snaputil.py and attemtps to write the snappy.ini file. The error is:
INFO: Configuring snappy...
ERROR: Configuration failed
Traceback (most recent call last):
File "./snappyutil.py", line 262, in _main
force=args.force)
File "./snappyutil.py", line 195, in _configure_snappy
'java_max_mem: %s\n' % jvm_max_mem,
NameError: name 'jvm_max_mem' is not defined
I’ve searched snappyutil.py and jvm_max_mem is not defined anywhere. In jpy the config file writes a property jvm_maxmem = None. The spelling is different.
Is this a version-dependency issue? The script I am writing is below:
#!/usr/bin/env bash
export SNAPPY_HOME_DIR=~/.snap/snap-python/snappy/
export JDK_HOME=/apps/java/jdk1.8.0_60/
export JAVA_HOME=/apps/java/jdk1.8.0_60/
# For instructions on installing apache-maven if necessary, see here: https://maven.apache.org/install.html
export PATH="/g/data/dg9/applications/apache-maven-3.5.2/bin:$PATH"
export JAVA_OPTS="-Xss10m -Xms512m -Xmx66560m"
export JPY_JVM_MAXMEM="64G"
export JPY_PY_CONFIG=`pwd`/jpyconfig.py
# clean up old install of jpy
rm -r $SNAPPY_HOME_DIR/jpy*
rm $SNAPPY_HOME_DIR/jdl*
module unload java
module load java/jdk1.8.0_60
module unload python
module unload python3
module load python3/3.6.2
pip3 wheel git+https://github.com/bcdev/jpy
module load esa-snappy
mv ./*.whl $SNAPPY_HOME_DIR
snappy-conf /apps/python3/3.6.2/bin/python3.6