Construct pipeline only once.