Course 1 - Week 1: Connection Error

When I did week 1 exercise, I got the connection error as the image below.
I used WSL 2 environment with docker. I successfully installed image and ran container of docker hub. But when I ran this line of code I got a connection error and I checked that the connection was still normal.

Any suggestion about that?
Thanks in advance.

Hi cuongvo
first of all welcome to our community.

If I undertood, you have successfully ping the remote repository. Right?

Just now I have tried to run the docker in my testbed by sudo and it worked fine.
Have you tried to run the docker image by sudo?

sudo docker run -it --rm -p 8888:8888 -p 8000:8000 --mount type=bind,source="$(pwd)",target=/home/jovyan/work deeplearningai/mlepc1w1-ugl:jupyternb

Cheers :thinking:

Sorry cuongvo
just now I have realized that you are trying to run the docker from windows, not from linux.
I guess that my advice is not helpful.
Let me check if I can run the Docker desktop and WSL2.

Regards

1 Like

So far I have been able to setup the Docker desktop and WSL. Now I’m facing a problem when importing cvlib, but this is before the problem you have.
In the meantime can you check that
pip install -r requirements.txt
worked fine in your Linux environment?
Regards

1 Like

I have already reproduced the code by 2 cases on WSL2 environment:

  1. Conda Environment: I have been able to setup the conda environment. And I run successfully the notebook file. (No connection error)
  2. Docker Environment: After starting docker image, I installed by pip install -r requirements.txt but I sill got a connection error.

It seems that the connection error comes from the network connects between WSL2 and Docker image.

I am still installing Ubuntu Server to check this issue.
Regards.

I have switched to Ubuntu server and run successfully the code with docker engine.
There is no connection error when I run the code.

I strongly believe that the issue is coming from the network connection between WSL2 and Docker image.
But I’m wondering how to fix this issue on WSL2. :cry:
Regards.

I’m still struggling to properly setup my docker image and WSL2. Hope to be able to reproduce your issue.
Regards

1 Like

Hi cuongvo
Please double check the Docker Desktop Settings. There is a ‘network’ section.
These are my settings (default).

Double check also the WSL Integration:

1 Like

Thank you so much @fabioantonini , I have solved the issue by your instruction.
:smiling_face_with_three_hearts:

Wow! Great!!
Happy to help

1 Like

Hi, @fabioantonini.

I have the exact same problem, but making my settings match yours doesn’t help me.
Is there anything else I should try?

P.S.
I’m using the 18.04 version of ubuntu instead of 20.04 - but I don’t think that should make any difference.

Hi @Jacob
welcome to Discourse!
What kind of problem do you have? DO you receive any error message?
Best regards

Same exact problem as that described by cuongvo.

Here’s my screenshot - but it’s basically the same.

Can you share the Docker settings?
Can you ping 8.8.8.8 from the docker image?
BR

The network/WSL Integration settings are what you posted in this thread - except I’m using Ubuntu 18.04 instead of 20.4

Any other settings?

How do I ping from the docker image? The ubuntu prompt just shows the jupyter notebook stream.

I did some testing from a notebook, and this is what I got:

Can you share the ‘WSL INTEGRATION’ window?
When you run the ubuntu 18.04 docker image you should have access to a shell.
From there you can use the ping command:
$ ping 8.8.8.8
ping 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=28.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=27.2 ms

here’s the integration window:

I don’t seem able to use the shell - because jupyter-lab is running in there.

Ok, I understand
before running the docker image,
(docker run -it --rm -p 8888:8888 -p 8000:8000 --mount type=bind,source="$(pwd)",target=/home/jovyan/work deeplearningai/mlepc1w1-ugl:jupyternb)

please run
$ ping 8.8.8.8
we need to understand if Ubuntu 18.04 has internet access

Got it!

image

So your ubuntu-18.04 has internet access.
Anyway when you run the docker image it doesn’t.
Please can you show all the messages shown when you run the docker image?
From the previous windows I can see only few traces