CONCOCTION was tested with Python 3.6 and Ubuntu 18.04.
Our Docker images are one of the fastest ways to get started.We highly recommend using a Docker environment.
Install docker engine by following the instructions here.
Fetch the docker image from docker hub.
$ sudo docker pull concoctionnwu/concoction:v3
To check the list of images, run:
$ sudo docker images
#output
#REPOSITORY TAG IMAGE ID CREATED SIZE
#concoctionnwu/concoction v1 cc84e8929fe1 15 hours ago 82.4G
Run the docker image in a GPU-enabled environment
$ docker run -itd --gpus all -p 10054:22 -p 10053:8888 --name Concoction concoctionnwu/concoction:v2 /bin/bash
$ docker start Concoction
$ docker exec -it Concoction /bin/bash
Due to the limitation of GitHub repositories in storing large files, we have stored the large files on Google Drive. Please download them using the following method and store them in the corresponding locations in the source code. https://drive.google.com/file/d/1ubcNOPoqzj1kk1yGtUAXvL2t-QKU_nuq/view?usp=drive_link
# extract the compressed archive and copy the files inside it to the appropriate destination
cd ./src
python ./cpLargeFile.py [The storage location of the downloaded files from Google Drive] [the desired location to store the extracted files]
# eg: python ./cpLargeFile.py /CONCOCTION_largeFile/CONCOCTION_largeFile.tar.gz /CONCOCTION_largeFile/CONCOCTION_largeFile
We recommend using conda to manage the remaining build dependencies. First create a conda environment with the required dependencies:
# add concoction python environment,
$ conda env create -f environment.yml
We use KLEE to extract dynamic information, so we have to build the KLEE first. The version of KLEE we used is v2.1. Download with LLVM. If you just want to quickly get started with the dynamic feature extraction function, it is recommended to use the container that comes with the KLEE tool.
When we extract static features, we will use JDK11.Download
$ conda activate pytorch1.7.1
$ cd ./concoction/detectionModel
$ python evaluation_bug.py --path_to_data ../data/data/train --mode train