bethgelab / adversarial-vision-challenge

NIPS Adversarial Vision Challenge
https://www.crowdai.org/challenges/nips-2018-adversarial-vision-challenge
41 stars 12 forks source link

Can't reach model server. #39

Open blgnksy opened 6 years ago

blgnksy commented 6 years ago

Hi, I can't access model server. I run my codes in a docker repository which's port 8989 is also made available.

My code :

from adversarial_vision_challenge.utils import read_images, store_adversarial
from adversarial_vision_challenge.utils import load_model

model = load_model()

And the output :

Wating for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
Still waiting for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
Still waiting for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
Still waiting for model server to start...
Retrying for the 1. time
Retrying for the 2. time
Retrying for the 3. time
Retried request for 3 times. Giving up.
=======> Can't reach model server: http://localhost:8989.
jonasrauber commented 6 years ago

Can you run docker logs on the model container.

imsyu commented 6 years ago

I have this problem too!!!Have you solved this problem?

blgnksy commented 6 years ago

My docker logs output is :

[I 07:52:07.187 NotebookApp](B Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[I 07:52:07.206 NotebookApp](B Serving notebooks from local directory: /notebooks
[I 07:52:07.207 NotebookApp](B 0 active kernels
[I 07:52:07.207 NotebookApp](B The Jupyter Notebook is running at:
[I 07:52:07.207 NotebookApp](B http://0.0.0.0:8888/?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b02e
[I 07:52:07.207 NotebookApp](B Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 07:52:07.207 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://0.0.0.0:8888/?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b02e
[I 07:52:08.633 NotebookApp](B 302 GET /?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 0.62ms
[I 07:52:08.645 NotebookApp](B 302 GET /tree?token=d4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 0.91ms
[W 07:52:20.844 NotebookApp](B 401 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.34ms referer=http://0.0.0.0:8888/login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b
[W 07:52:36.850 NotebookApp](B 401 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.27ms referer=http://0.0.0.0:8888/login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b
[W 07:52:54.304 NotebookApp](B 401 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.60ms referer=http://0.0.0.0:8888/login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b
[I 07:53:10.739 NotebookApp](B 302 POST /login?next=%2Ftree%3Ftoken%3Dd4f4361e7080a5351b5e6f18bc5886f54f9653fd23e2b (172.17.0.1) 1.01ms
[I 07:53:17.223 NotebookApp](B Writing notebook-signing key to /root/.local/share/jupyter/notebook_secret
[W 07:53:17.224 NotebookApp](B Notebook NIPS_Repo/EnsembleAttacks-v1.ipynb is not trusted
[I 07:53:17.749 NotebookApp](B Kernel started: cb1f9aa7-bf98-40a6-91b6-8c45d5dd795f
[I 07:53:18.430 NotebookApp](B Adapting to protocol v5.1 for kernel cb1f9aa7-bf98-40a6-91b6-8c45d5dd795f
[I 07:53:22.370 NotebookApp](B Starting buffering for cb1f9aa7-bf98-40a6-91b6-8c45d5dd795f:a354d77a45d04aed8c3f50f7895ccb8e
[W 07:53:31.388 NotebookApp](B Notebook NIPS_Repo/combat/Untitled.ipynb is not trusted
[I 07:53:31.469 NotebookApp](B Kernel started: 7ec77c14-2cbe-43eb-9c32-27f6bfee8d20
[I 07:53:31.909 NotebookApp](B Adapting to protocol v5.1 for kernel 7ec77c14-2cbe-43eb-9c32-27f6bfee8d20
[I 07:55:31.494 NotebookApp](B Saving file at /NIPS_Repo/combat/Untitled.ipynb
blgnksy commented 6 years ago

@imsyu Unfortunately.

jonasrauber commented 6 years ago

Why are you starting a Jupyter notebook server in your model container? Your container should start with the script that initializes the model and starts the model server. Please have a look at the baseline models.

blgnksy commented 6 years ago

I use the Jupiter for development purposes only. I am aware of the baseline code.

imsyu commented 6 years ago

Maybe we should load model and wrap it as a foolbox model first. I forgot to do this.

imsyu commented 6 years ago

But I have this error : Client has not sent any requests to to the server for more than 180.17973017692566s

jonasrauber commented 6 years ago

Again: your Docker container for the model has to start a script when the container gets started and that script has to start the model server. In the baseline resnet model the run.sh script starts the main.py and that calls model_server(fmodel) on the Foolbox model instance. Your logs, on the other hand, show that your container starts Jupyter instead of a script that starts the model server.