bakcup pyc, then move the new py , and run

$ docker run --runtime=xxx -it -v  ~/TOT:/tmp/    docker-name   /bin/bash

root@e275ae42e718:/tmp/iva/yolo/utils#  mv /usr/local/lib/python2.7/dist-packages/iva/yolo/utils/model_io.pyc    /usr/local/lib/python2.7/dist-packages/iva/yolo/utils/model_io_old.pyc

 

root@e275ae42e718:/tmp/iva/yolo/utils# cp model_io.py   /usr/local/lib/python2.7/dist-packages/iva/yolo/utils/

 

run the new py

 

 

 

1. Firstly, login in the docker.

2. Find the pyc file which you want to add something.

root@895a1ece0689:/debug# find /usr |grep anchor
/usr/local/lib/python3.6/dist-packages/models/anchors.pyc

3. Then backup this pyc file

root@895a1ece0689:/debug# mv  /usr/local/lib/python3.6/dist-packages/models/anchors.pyc    /usr/local/lib/python3.6/dist-packages/models/anchors.pyc.old

 

4. In source code side, modify the anchors.py,  and copy into the docker under folder  /usr/local/lib/python3.6/dist-packages/models/

 

 

Sometimes, meet unexpected error. 

Please

1. replace the main.pyc too

2. replace other pyc files too

posted on 2020-07-29 16:30  cdekelon  阅读(64)  评论(0)    收藏  举报

导航