容器中找system路径

Q:

 I just followed this post and ran a training example on MNIST data in docker caffe using jupyter notebook. Now say I want to use a customized loss function. I learned that if it's a classically installed caffe, the newly created .hpp file should be put into $CAFFE_PATH/include/caffe/layers/ and .cpp file should be put into $CAFFE_PATH/src/caffe/layers/
However in docker, how to find these directories? (or if there's such concept?)

A:


0down voteaccepted

If you look at the article it says

docker run -p 8887:8888 -v ~/Desktop/caffee/model2/notebooks:/model1/notebooks -v ~/Desktop/caffe/model2/data:/model1/data -d model2

So this will place the generated files in ~/Desktop/caffe/model2/data on your system. If you want to explore the files insider the container. You will do

$ docker ps 

This will show you the id of your container. Then get a bash inside it

$ docker exec -it <containerid> /bin/bash

Once inside you can got to the /model1/data

cd /model1/data

Or any folder for that matter and explore the files.

shareedit

posted on 2017-12-08 16:29  塔上的樹  阅读(143)  评论(0)    收藏  举报