Creating Spatial Index for Geopackage using QGIS?
It's possible in QGIS3. You can click "Create Spatial index" from the Layer Properties Dialog:
I don't believe that it is possible through the QGIS UI at the moment. Read the GDAL GeoPackage vector manual http://www.gdal.org/drv_geopackage.html and use ogrinfo.
ogrinfo -SQL "SELECT CreateSpatialIndex('table_name', 'geom_column_name')" geopackage.gpkg