anibali / docker-pytorch

A Docker image for PyTorch
MIT License
971 stars 227 forks source link

docker can not find my python file #11

Closed yaoing closed 5 years ago

yaoing commented 5 years ago

there are my project path and my python file will to be run:

[yao@gpu02 ~/apps/DSFD]pwd
/home/yao/apps/DSFD
[yao@gpu02 ~/apps/DSFD]ls
data     eval_tools   fddb_test.py  layers   model        README.md  utils                      widerface_val.py
demo.py  face_ssd.py  imgs          LICENSE  __pycache__  sfd        WIDERFace_DSFD_RES152.pth

after, I try to run command with: sudo docker run --rm -it --init --runtime=nvidia -v "/home/yao/apps/DSFD:/app" pytorch/pytorch:0.4.1-cuda9-cudnn7-runtime python3 demo.py

but it return python3: can't open file 'demo.py': [Errno 2] No such file or directory

I know it's a path error,but I can not how to fix it . please help me ! thanks~

yaoing commented 5 years ago

my docker image was downloaded from docker hub

yaoing commented 5 years ago

solved!