PaulCCCCCCH / Robustar_implementation

13 stars 2 forks source link

Robustar

Logo

This repository contains the source code for Robustar, an interactive toolbox for robust vision classification.

To Run Docker

First, run robustar.sh -m setup -a <version_name> to pull robustar image.

Then, run robustar.sh -m run <options>. For a list of <options>, please run robustar.sh with no arguments. Make sure you set up the mounting directories and port forwarding correctly.

If at any point you wish to change the setting, please remove the docker container and setup a new one. You can run docker container ls -a to see a list of containers, and use docker container rm <name> to remove.

Please make sure port 6848 and 6006 on your machine are available.

Configuration File

You need to pass a config file (default ./configs.json) to robustar.sh. It is a JSON file with the following fields:

Build Docker Image

First, pre-process the scripts with

dos2unix ./scripts/install_pytorch.sh
dos2unix ./scripts/start.sh

In front-end directory, run npm run build.


Then, return back to root directory and run (be aware of the . at the end).

docker build --build-arg VCUDA=<cuda version> -t <user_id>/<repo>:<version> .

where <cuda version> is chosen from cpu, 9.2, 10.2, 11.1 and 11.3.

For example

docker build --build-arg VCUDA=11.3 -t paulcccccch/robustar:cuda11.3-0.1.0-beta .

Finally, push onto DockerHub with:

docker push <user_id>/<repo>:<version>

For example

docker push paulcccccch/robustar:cuda11.3-0.1.0-beta

Build Base Docker Image

In docker-base directory, run

docker build . -t <user_id>/<repo>:<version>

For example,

docker build . -t paulcccccch/robustar-base:base-0.3.0

Then push it with

docker push <user_id>/<repo>:<version>

For example,

docker push paulcccccch/robustar-base:base-0.3.0

Dev setup

Run npm install at the root directory of this project

See backend doc and frontend doc for more details

Trouble Shooting

Error: Install pypiwin32 package to enable npipe:// support

If pip install pypiwin32 doesn't fix this issue, try

python <path-to-python-env>\Scripts\pywin32_postinstall.py -install

This would install the version needed.