There is no tutorial on how to do it, although it should be possible.
There is an issue discussing this:

  
      github.com/huggingface/transformers
  
  
    
  
	  
  

  
    
      RAG - how to precompute custom document index? 57
    

    
      
        opened 
        
          
        
        Sep 30, 2020
      
      


      
        
          
          aced125
        
      
    
  



  Was wondering if there was any code snippet / blog post showing how one could load their own documents and index...