Cache apt and pip packages