NGC failed to download the pre-trained weights in tlt model training

I am trying to implement a dockerized version of the transfer learning toolkit where I pull the NGC Nvidia docker into my own docker env and try to run the training in the form of a .py script.
Command to pull NGC docker :
FROM nvcr.io/nvidia/tlt-streamanalytics:v2.0_py3
But I am not able to download the pre-trained weights model inside the directory which I can use for further training steps.

I have converted the jupyter notebook used for trainig into a python script(which I am attaching for your reference).
detectnet_v2.py (26.0 KB)

getting error like :

Any help will be really appreciable.
Thanks

There is ngc bin file inside 2.0_py3 docker.
Please see details below.

$ docker run --runtime=nvidia -it -v ~/demo_2.0:/workspace/tlt-experiments -p 8888:8888 nvcr.io/nvidia/tlt-streamanalytics:v2.0_py3
–2021-01-07 09:00:18-- https://ngc.nvidia.com/downloads/ngccli_reg_linux.zip
Resolving ngc.nvidia.com (ngc.nvidia.com)… 13.225.97.79, 13.225.97.113, 13.225.97.13, …
Connecting to ngc.nvidia.com (ngc.nvidia.com)|13.225.97.79|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 20110328 (19M) [application/zip]
Saving to: ‘/opt/ngccli/ngccli_reg_linux.zip’

ngccli_reg_linux.zip 100%[====================================================================================================>] 19.18M 23.3MB/s in 0.8s

2021-01-07 09:00:19 (23.3 MB/s) - ‘/opt/ngccli/ngccli_reg_linux.zip’ saved [20110328/20110328]

Archive: /opt/ngccli/ngccli_reg_linux.zip
inflating: /opt/ngccli/ngc
extracting: /opt/ngccli/ngc.md5
root@02c4f89b270d:/workspace# which ngc
/opt/ngccli/ngc
root@02c4f89b270d:/workspace# ngc --version
NGC Registry CLI 1.24.0

his Morganh … thanks for your reply. so what you told is happening correctly when I pulled the docker and start training on Jupiter notebook like this.

But in my case I am creating my own docker and inside docker I am pulling tlt-stream like this:
FROM nvcr.io/nvidia/tlt-streamanalytics:v2.0_py3
and calling all the files inside the docker and running that docker.
At that time I am not getting pre-trained models.
Any solution for this really appreciable.
thanks

According to your original attached screenshot, seems that the ngc is not found.

/bin/sh: 1:ngc: not found

See the log in my previous comment.
You can try to download the ngc tool when you generate your own docker.

$ wget https://ngc.nvidia.com/downloads/ngccli_reg_linux.zip

@Morganh hii
I have done that but still getting the error:
/bin/sh: 1:ngc:not found.
I am sharing the logs

Reference:
mkdir -p /opt/ngccli &&
wget “https://ngc.nvidia.com/downloads/ngccli_reg_linux.zip” -P /opt/ngccli &&
unzip -u “/opt/ngccli/ngccli_reg_linux.zip” -d /opt/ngccli/ &&
rm /opt/ngccli/*.zip &&
chmod u+x /opt/ngccli/ngc

@Morganh hii
if I am not wrong


this is how my docker looks.

my terminal.
at the time of unzipping getting this error?
thanks

Please change

“/opt/ngccli/ngccli_reg_linux.zip”

to
“/opt/ngccli/ngccli_reg_linux.zip”

One tip, please verify in your local pc before writing the command in the dockerfile.

1 Like

@Morganh what I can see here is there is no change in both the commands which you have mentioned . what I need to replace exactly with what ?

“/opt/ngccli/ngccli_reg_linux.zip”

to
“/opt/ngccli/ngccli_reg_linux.zip”

Please check the quotation.
Please use " instead of “

1 Like

@Morganh Hey thanks a lot… now I am able to run it successfully.
thanks for your efforts.