microsoft / aerial_wildlife_detection

Tools for detecting wildlife in aerial images using active learning
MIT License
226 stars 58 forks source link

AIDE not fully launching from docker #30

Open marireeves opened 3 years ago

marireeves commented 3 years ago

Hi Ben - I met you a few weeks ago when you demoed AIDE for our AI for Conservation Slack group. I have been trying to use AIDE on an Azure VM (one of the Ubuntu Data Science Virtual Machines). I got it installed through docker following your instructions, but it doesnʻt seem to be launching from docker, in that the UI (in gunicorn?) is just not opening up. Once itʻs open, I also canʻt seem to kill it in the terminal without shutting down the VM. For complicated reasons, I am running the Ubuntu GUI through VNC Viewer and Bitvise on a different Windows VM, so maybe thatʻs the trouble? But other programs in there (Firefox) seem to be showing up correctly, so Iʻm a little stumped. Also, neither ^C in this terminal nor /.AIDE.sh stop from a different terminal seem to kill it.

I did not set those environment variables prior to launching in docker, so maybe thatʻs the problem? If I manually type in http://0.0.0.0:8080 to firefox, I do get the AIDE Label Interface Sign in screen...but also, I donʻt know how to sign in (I tried what I entered into the settings.ini file but that didnʻt work)?

Here is the terminal output:

Booby@FindTheBirdsUbuntu:~/aerial_wildlife_detection$ sudo docker/docker_run_gpu.sh Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable redis-server Starting redis-server: redis-server.

Setup of database IS STARTING

========================== RABBITMQ SETUP IS STARTING

sysctl: setting key "net.ipv4.tcp_keepalive_time": Read-only file system sysctl: setting key "net.ipv4.tcp_keepalive_intvl": Read-only file system sysctl: setting key "net.ipv4.tcp_keepalive_probes": Read-only file system [2021-02-05 22:25:30 +0000] [1703] [INFO] Starting gunicorn 20.0.4 [2021-02-05 22:25:30 +0000] [1703] [INFO] Listening at: http://0.0.0.0:8080 (1703) [2021-02-05 22:25:30 +0000] [1703] [INFO] Using worker: sync [2021-02-05 22:25:30 +0000] [1709] [INFO] Booting worker with pid: 1709 [2021-02-05 22:25:30 +0000] [1710] [INFO] Booting worker with pid: 1710 ^C

bkellenb commented 3 years ago

Hello Mari,

Thanks a lot for opening the issue. I will try and go through your comments step-by-step below.

I got it installed through docker following your instructions, but it doesnʻt seem to be launching from docker, in that the UI (in gunicorn?) is just not opening up.

From your log the server (Gunicorn) is launching as it should; you can see this from the last five messages in the Docker command line output:

[2021-02-05 22:25:30 +0000] [1703] [INFO] Starting gunicorn 20.0.4
[2021-02-05 22:25:30 +0000] [1703] [INFO] Listening at: http://0.0.0.0:8080 (1703)
[2021-02-05 22:25:30 +0000] [1703] [INFO] Using worker: sync
[2021-02-05 22:25:30 +0000] [1709] [INFO] Booting worker with pid: 1709
[2021-02-05 22:25:30 +0000] [1710] [INFO] Booting worker with pid: 1710

Perhaps the confusion comes from the description of what Docker does—it only launches the Web server, but does not open a Web browser window. This needs to be done manually; exactly as you did: open Firefox and navigate to the provided URL and port (http://localhost:8080).

Once itʻs open, I also canʻt seem to kill it in the terminal without shutting down the VM.

Yes, this is due to the way Docker works: it basically creates a separate environment for AIDE to run in. Therefore, commands issued on the host machine will not reach it. This includes ./AIDE.sh stop. You can tether into the running Docker container if you want, but to stop the server it is indeed easier to simply shut down the Docker container:

docker stop aide_cnt

I donʻt know how to sign in (I tried what I entered into the settings.ini file but that didnʻt work)?

This in turn is more worrying. You should be able to log in with the user credentials in the docker/settings.ini file (section [Project], parameters adminName and adminPassword). Default values are "admin" for both. Are you sure you checked the correct settings.ini file? If you use Docker, it has to be the one in the /docker folder, not in the /config folder. Do you see an error message when you try to log in, maybe also on the Firefox console?

marireeves commented 3 years ago

got it, thanks! I was looking at the wrong settings file. I got it up and running and have a couple quick questions. Can I change the image folder path? And is the AI model not enabled yet. It says coming soon...

bkellenb commented 3 years ago

Alright, good to know! In principle, you can change the base image folder by modfying the entry in the settings.ini file. However, accessing files on the host machine from within the Docker container is a complicated procedure and not recommended. Instead, I would either configure Docker to create its volumes on a large disk, or else install AIDE on the host system.

About the AI model: models themselves are active and can be configured and trained manually through the project configuration page ("AI model" ➔ "settings", resp. "AI model" ➔ "Workflow Designer"). Auto-training functionality is currently disabled, though. This will be re-enabled shortly with the official version 2 that is to come. If you want to take a peek at it, you can do so under the respective branch.