How to use BERT in Docker

I have been trying to use BertForSequenceClassification for document classification in Docker but while generating the logits using this line outputs = bert_model(**inputs) it just stops. Can anyone suggest me a solution for this or any alternate approach.