This readme describes the requirements and steps for running the EQUAS infrastructure via Docker.
- Ubuntu 16.04+
- Nvidia CUDA capable GPU with latest Drivers
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update sudo apt upgrade sudo apt install nvidia-driver-396
- If running in EC2, set up the Docker repositories. https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository
$ sudo apt-get update
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
- Install the latest version of Docker. https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1
$ sudo apt-get update
$ sudo apt-get install docker-ce
- Run the following command if you would like to use Docker as a non-root user.
sudo usermod -a -G docker $USER
-
Log out and back in for this to take effect.
-
Install Docker Compose. https://docs.docker.com/compose/install/
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- Install NVIDIA Container Runtime for Docker .https://github.com/NVIDIA/nvidia-docker
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
sudo apt-get purge -y nvidia-docker
# Add the package repositories
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
# Install nvidia-docker2 and reload the Docker daemon configuration
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
# Test nvidia-smi with the latest official CUDA image
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi
- Download the required model files, unzip them and place them in the proper application folder (evaluation_datasets)
sudo curl -L https://data.kitware.com/api/v1/item/60a3ff992fa25629b9558504/download?contentDisposition=inline -o /usr/local/evaluation_dataset
sudo chmod +x /usr/local/evaluation_dataset
sudo apt install unzip
sudo unzip '/usr/local/evaluation_dataset/EQUAS Resources.zip' -d /<application_root>/evaluation_dataset
- Extract the EQUAS distribution package to the location of your choice and navigate to the docker-compose directory.
- Launch the VQA model Docker containers by running the following command from a terminal. The first time this command is run Docker will need to download and compile all the necessary dependencies. (This can take in excess of 2 hours)
- Launch the EQUAS Server and MongoDB containers. From a new terminal window run...
sh run_EQUAS_Docker.sh
- You should see the following in the teminal window.
Successfully built 44fab57147ca
Successfully tagged xai-equas:latest
Creating xai-mongodb ... done
Creating xai-equas ... done
- Open a web browser and navigate to http://localhost:8187
- Click sign in on the home page and login with user/user or admin/admin
- At this point your should see the EQUAS interface and can begin interacting with the VQA system.
- The EQUAS Interface exposes several modalities, to run the one shot detector modality navigate to http://localhost:8187/#/oneshotdemo?modality=component
- To stop the Docker containers run the following.
sh stop_EQUAS_Docker.sh
sh stop_MODELS_Docker.sh