Where do cores store their datasets when using the docker container?

I tried to run deep learning models using the cifar10 dataset. When keras is installed on the system and tries to use the dataset, keras loads it once in:

~/.keras/datasets/

I say this because I can use this directory and I see:

$ ls
cifar-10-batches-py        cifar-10-batches-py.tar.gz cifar-100-python           cifar-100-python.tar.gz    mnist.pkl.gz

However, when I install keras in a docker container, it ~/.kerasdoes not exist. I am sure that they save it somewhere, because I can later load the data set when I enter the docker image through the container with bash (c docker run -it --rm tf_img bash). However, I can not find files that can be saved. Where are they stored?

Also, when I find this location, I planned to combine my local ~/.keras/(or any other computer with which I was logged in) with containers, so the data sets do not need to be loaded 30 times every time I try to prepare some kind of model.


The first step I found where is .kerasusing the command find -type d -name .kerasin the container (its in ./root/.keras). However, it seems that even if I placed the folder correctly, it will still load it (although I went to a place /root/.kerasin the container and see things there, as it is on my local computer). I did:

docker run -it --rm -v /Users/folder1:/Users/folder1 -v /Users/Pinocchio/.keras:/root/keras tf_cpu cifar10_cnn.py

and it still loads the dataset. Why?

Another thing that strikes me super weird is that when I bash into the container, it launches me inside the root, which he had never done before.

+4
1

, . , .keras , bash (, docker run -it --rm -v /local:/container image_name bash):

find -type d -name .keras 

,

./root/.keras

:

docker run -it --rm -v /Users/folder1:/Users/folder1 -v /Users/Pinocchio/.keras:/root/.keras tf_cpu cifar10_cnn.py

, , .keras, keras.

+2

Source: https://habr.com/ru/post/1667917/


All Articles