Run MNIST inference in Apache Flink
- Package the project.
mvn clean package # you could get MNISTInference.jar in target/ folder
- Download the native libraries of JCuda and JCublas to lib/ folder of your Flink distribution
./add-jcuda-dependency.sh <your_flink_dist>
-
Prepare image data. You could download the training data or test data. Then, decompress it by
gzip xxx.gz
. -
Configure to enable GPU plugin, please refer to user document.
-
Start the Flink cluster and run the MNIST inference job.
cd $FLINK_HOME
bin/start-cluster.sh
bin/flink run path/to/MNISTInference.jar --image-file path/to/imagefile