TypeError: __init__() got an unexpected keyword argument 'gpu' in pytorch_lightning

48 Views Asked by At

I have docker image build. When I try running it, my containers show this error:

Error executing job with overrides: []
Traceback (most recent call last):
  File "train.py", line 72, in train
    callbacks=callbacks
  File "/home/user/.local/lib/python3.7/site-packages/pytorch_lightning/utilities/argparse.py", line 340, in insert_env_defaults
    return fn(self, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'gpu'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

My environment:

  • Ubuntu 22.04
  • Docker 25.0.4
  • pytorch 1.9.0+cu111
  • NVIDIA Container Toolkit CLI version 1.14.6
  • NVIDIA Quadro k5200

here my requirement:

opencv-python==4.5.3.56
pydicom==2.2.2
pylibjpeg==1.3.0
pylibjpeg-libjpeg==1.2.0
scipy==1.5.4
Pillow==8.3.1
tqdm==4.62.3
python-dotenv==0.19.1
matplotlib==3.2.2
scikit-image==0.17.2
transformers ==4.14.1

here my requirements_docker:

pytorch-lightning==1.7.2
torchmetrics==0.9.1
monai[all]==0.8.1
segmentation-models-pytorch==0.2.1
albumentations==1.1.0
Flask==2.0.3
rq==1.10.0
streamlit==1.9.0
PyYAML==5.4.1
attrdict==2.0.1
hydra-core==1.1.0
wandb==0.12.19
python-dotenv==0.19.1
pandas==1.3.3
arrow==1.2.0
seaborn==0.11.2
hiredis==2.0.0
pydicom==2.2.2
pylibjpeg==1.3.0
pylibjpeg-libjpeg==1.2.0
colorhash==1.0.4
watchdog==2.1.9
plotly==5.8.2

Maybe someone can help me why I have this error.

I also tried to delete the docker image and rebuild it but I have the same problem, I also have different docker image as in this below:

REPOSITORY                  TAG                              IMAGE ID       CREATED          SIZE
ubuntu                      latest                           ca2b0f26964c   3 weeks ago      77.9MB
nvidia/cuda                 11.6.2-base-ubuntu20.04          2098e65daccd   4 months ago     154MB
hello-world                 latest                           d2c94e258dcb   10 months ago    13.3kB
pytorch/pytorch             1.12.0-cuda11.3-cudnn8-runtime   eb86f059e26c   21 months ago    5.92GB
pytorch/pytorch             1.9.0-cuda11.1-cudnn8-runtime    12da3f8ec2ec   2 years ago      7.92GB
nvidia/digits               latest                           fb4bfabb5acd   5 years ago      2.8GB

but my Docker is not working yet.

0

There are 0 best solutions below