Cavity formation in deformed amorphous solids on the nanoscale