With this simple framework, you can easily build and substitute your own Java Jar-file to process the frames of the Batch job.
Starting with your own Java source file
yourFile.java
, just follow the instructions above to build the Java Jar-file
yourFile.jar
.
javac -d yourFile-bin yourFile.java
jar -cvfe yourFile.jar com.example.yourFile -C yourFile-bin/ com/example
Now you will have the Java Jar-file
yourFile.jar
.
Just edit the
runBatchJava.py
file to change the
workerBinFilePath
to replace
helloFrame.jar
with the name of your Java Jar-file
yourFile.jar
, which
runs on an instance and processes a single frame. You may need to install different dependencies in the
installerCmd
line.
Pro Tip: When you are experimenting with getting your code running on a Neocortix Scalable Compute instance, it may be easiest to spin up a single instance and get it installed and running there, before running it at scale as a part of a Batch job.