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

Run locally #2

Open
g30ba1 opened this issue May 4, 2020 · 8 comments
Open

Run locally #2

g30ba1 opened this issue May 4, 2020 · 8 comments

Comments

@g30ba1
Copy link

g30ba1 commented May 4, 2020

I've built all the containers successfully.

But I've NO idea how to run them.

Any tip?

@dusty-nv
Copy link
Owner

Hi @g30ba1 , you can find the run instructions on NGC. For example:

https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-ml:r32.4.2-py3

@uersoy
Copy link

uersoy commented May 30, 2020

Hi @g30ba1 , you can find the run instructions on NGC. For example:

https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-ml:r32.4.2-py3

Hello @dusty-nv,

I can run the container at localhost:8888 however all my saved work gets lost the next time I access the same. Seems like no checkpoint is saved when I save my jupyterlab files. Do you know why this may be happening?

Thanks!

@g30ba1
Copy link
Author

g30ba1 commented May 30, 2020

Hi @g30ba1 , you can find the run instructions on NGC. For example:

https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-ml:r32.4.2-py3

Hi Dusty, thank you for your time.

I found that if we re-built the containers, the command to run is:

sudo docker run -it --rm --runtime nvidia --network host -v /home/user/Documents/Projects:/home l4t-tensorflow:r32.4.2-tf1.15-py3

(-v flag indicates that we will be working on a local folder)

NGC containers are a nice tool to get an environment as quickly as possible.

@g30ba1
Copy link
Author

g30ba1 commented May 30, 2020

Hi @g30ba1 , you can find the run instructions on NGC. For example:
https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-ml:r32.4.2-py3

Hello @dusty-nv,

I can run the container at localhost:8888 however all my saved work gets lost the next time I access the same. Seems like no checkpoint is saved when I save my jupyterlab files. Do you know why this may be happening?

Thanks!

You must use the -v flag to WORK on a local folder while using the container, i.e.:

sudo docker run -it --rm --runtime nvidia --network host -v /home/user/Documents/Projects:/home l4t-tensorflow:r32.4.2-tf1.15-py3

If you are suing the container published on Nvidia´s NGC, the command is:

sudo docker run -it --rm --runtime nvidia --network host -v /home/user/project:/location/in/container nvcr.io/nvidia/l4t-ml:r32.4.2-py3

To use a local folder, you can use any path existent on your local machine (host), or you can create the folder while you´re INSIDE the container.

@uersoy
Copy link

uersoy commented May 31, 2020

Hi @g30ba1 , you can find the run instructions on NGC. For example:
https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-ml:r32.4.2-py3

Hello @dusty-nv,
I can run the container at localhost:8888 however all my saved work gets lost the next time I access the same. Seems like no checkpoint is saved when I save my jupyterlab files. Do you know why this may be happening?
Thanks!

You must use the -v flag to WORK on a local folder while using the container, i.e.:

sudo docker run -it --rm --runtime nvidia --network host -v /home/user/Documents/Projects:/home l4t-tensorflow:r32.4.2-tf1.15-py3

If you are suing the container published on Nvidia´s NGC, the command is:

sudo docker run -it --rm --runtime nvidia --network host -v /home/user/project:/location/in/container nvcr.io/nvidia/l4t-ml:r32.4.2-py3

To use a local folder, you can use any path existent on your local machine (host), or you can create the folder while you´re INSIDE the container.

Thank you Jorge. I can use a local folder to save my scripts, notebooks however I am wondering how to keep the changes I make to the whole container image. Let's say I install new dependencies, libraries on top of existing default ones. Will I have to create a new container image?

@uersoy
Copy link

uersoy commented Jun 1, 2020

Hi @g30ba1 , you can find the run instructions on NGC. For example:
https://ngc.nvidia.com/catalog/containers/nvidia:l4t-ml

sudo docker run -it --rm --runtime nvidia --network host nvcr.io/nvidia/l4t-ml:r32.4.2-py3

Hello @dusty-nv,
I can run the container at localhost:8888 however all my saved work gets lost the next time I access the same. Seems like no checkpoint is saved when I save my jupyterlab files. Do you know why this may be happening?
Thanks!

You must use the -v flag to WORK on a local folder while using the container, i.e.:
sudo docker run -it --rm --runtime nvidia --network host -v /home/user/Documents/Projects:/home l4t-tensorflow:r32.4.2-tf1.15-py3
If you are suing the container published on Nvidia´s NGC, the command is:
sudo docker run -it --rm --runtime nvidia --network host -v /home/user/project:/location/in/container nvcr.io/nvidia/l4t-ml:r32.4.2-py3
To use a local folder, you can use any path existent on your local machine (host), or you can create the folder while you´re INSIDE the container.

Thank you Jorge. I can use a local folder to save my scripts, notebooks however I am wondering how to keep the changes I make to the whole container image. Let's say I install new dependencies, libraries on top of existing default ones. Will I have to create a new container image?

I figured out. The below link explains it.
https://docs.nvidia.com/deeplearning/frameworks/user-guide/index.html

@g30ba1
Copy link
Author

g30ba1 commented Jun 1, 2020

Nice find! I'm already reading it.

Regarding your question, yes, you have to re-built an image, to add libraries, dependencies or any other requirements for your projects.

@uersoy
Copy link

uersoy commented Jun 1, 2020

Nice find! I'm already reading it.

Regarding your question, yes, you have to re-built an image, to add libraries, dependencies or any other requirements for your projects.

I also read the whole thing to learn but I found the answer to my question in Section 10.1.4.

dusty-nv pushed a commit that referenced this issue Nov 3, 2023
Build EfficientViT package using PyTorch-distributed
dusty-nv pushed a commit that referenced this issue Sep 12, 2024
dusty-nv pushed a commit that referenced this issue Oct 13, 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

3 participants