Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the docker container data mounted to on my system? #382

Closed
jacobhq opened this issue Feb 7, 2024 · 4 comments
Closed

Where is the docker container data mounted to on my system? #382

jacobhq opened this issue Feb 7, 2024 · 4 comments

Comments

@jacobhq
Copy link

jacobhq commented Feb 7, 2024

In run.sh, I see:

--volume $ROOT/data:/data \

on line 54, however when I run echo $ROOT, it outputs an empty line.

My end goal is to have this data be stored on an external drive, however I can't find this data folder on my SD card at the moment.

Also just wanted to mention how helpful I find this project - it's great!

Any help would be appreciated. Thanks!

@dusty-nv
Copy link
Owner

Hi @jacobhq, sorry for the delay - the $ROOT variable gets set inside the run.sh script to the directory in which run.sh is located in (your jetson-containers directory)

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

(the $ROOT variable won't persist outside of run.sh, which is maybe why you can't print it?)

Anyways, yes the standard location for the model/data cache is in your jetson-containers/data directory, and it would be easiest to just clone jetson-containers to your SD card - but you can change that data directory to wherever you want on your device (but it should always be mounted to the same place inside the container under /data)

run.sh is just a helper script and will print out the docker run command that it invokes - you can either edit the script to change this command, or ditch run.sh completely and just run your own docker run command (both ways are shown in the package readme's in the jetson-container docs)

Also, just to point it out - your jetson-containers repo does not store the containers themselves (those container images are stored by the docker daemon elsewhere, in what's known as the docker data root). Both your jetson-containers repo and docker data root can be moved around independently.

@jacobhq
Copy link
Author

jacobhq commented Feb 15, 2024

Ok, thanks - that makes sense! So my understanding is that the data directory is not stored in the docker data root. I've moved the docker root to an external SSD following the steps outlined in setup.md. To do the same with the data directory, should I just clone the repo to the SSD or is there a better way (like just changing the location of the data directory mounted to the container)? If so, how would I do that?

@dusty-nv
Copy link
Owner

You can literally just move (or re-clone) your jetson-containers repo to your desired location and start the container again, and by virtue of that $ROOT variable it will start the container next time to mount /data to your updated jetson-containers location.

@jacobhq
Copy link
Author

jacobhq commented Feb 15, 2024

Great, thank you!

@jacobhq jacobhq closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants