GithubHelp home page GithubHelp logo

standardgalactic / smartkt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smartkt/smartkt

0.0 0.0 0.0 30.91 MB

Shell 0.05% JavaScript 0.11% C++ 52.29% Python 0.87% Perl 1.73% C 40.38% Objective-C 0.21% Assembly 3.86% CSS 0.09% Makefile 0.17% HTML 0.20% Batchfile 0.02% GDB 0.02% Dockerfile 0.01%

smartkt's Introduction

DEPENDENCIES

Install dependencies using: sudo ./install_dependencies.sh

CLANG SETUP

chnage the path for clang in parser/clang_parser cl.Config.set_library_file("/usr/lib/x86_64-linux-gnu/libclang-6.0.so.1")

RUN INSTRUCTIONS

  • python initialize.py <path_to_file>
  • python examine.py <name_of_project> <path_to_executable>

Example:

  • python initialize.py projects/smallproj
  • python examine.py smallproj projects/smallproj/build/prog

The server starts running at localhost:5000/ Currently supported queries:

  • Static:
    • Class Map: (Sample query: "show classmap")
    • Design Patterns (Sample query: "what design patterns")
    • Type (Sample query: "what is the type of x")
    • Parent (Sample query: "What is the parent of x")
    • Return type
    • Function details
    • List all global variables
    • Dependencies
  • Dynamic:
    • Thread activity (Sample query: "Display activity of thread 0")
    • Call graph (Sample query: "Show call graph")
  • VCS:
    • Github Issues
    • Github commits (minimal)

DOCKER

RUNNING ON DOCKER

In order to run SmartKT:

  • Get the latest image (you can specify any other label that latest)

    sudo docker pull spandankumarsahu/smartkt:proxy_latest (For proxy-enabled KGP network)

    sudo docker pull spandankumarsahu/smartkt:noproxy_latest (For outside network)

  • Run the container:

    sudo docker run --name <anyName> --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE -p 5000:5000 -p 5001:5001 -p 7000:7000 -p 7777:7777 smartkt:proxy_latest (For proxy-enabled KGP network)

    sudo docker run --name <anyName> --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE -p 5000:5000 -p 5001:5001 -p 7000:7000 -p 7777:7777 smartkt:noproxy_latest (For outside network)

  • Get the IP of the docker:

    sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <containerName>

  • On the browser, point to http://<IP>:5000/

  • Stopping the docker:

    sudo docker stop <containerName>

    sudo docker rm <containerName>

BUILDING ON DOCKER

(INSTRUCTIONS FOR SMARTKT TEAM ONLY)

Please note that this repository is internally connected to Dockerhub, but only on noproxy branch. So, any changes you push to this Github repository on noproxy branch, results in the latest docker image on Dockerhub.

You need to manually push proxy-based Docker images to Dockerhub by following these instructions.

(** It is however, highly discouraged that you push to Dockerhub directly. You should make appropriate changes in the Dockerfiles and let the integrated system build the new image. And then push the new image. Please avoid docker commit. **)

  • To build a dockerized image:

    sudo docker build -t spandankumarsahu/smartkt:proxy_latest .

  • You can view the images created by running:

    sudo docker images

  • In order to run an image, you just need to run:

    sudo docker run --name <anyName> --security-opt="apparmor=unconfined" --cap-add=SYS_PTRACE spandankumarsahu/smartkt:proxy_latest

  • Once started, you can view the current images running:

    sudo docker ps

  • In order to get inside one of these containers, just run:

    sudo docker exec -it <containerName> bash

  • Once inside the docker, you can make as many edits to the container as you like. Once done, exit the container and run:

    sudo docker commit <containerName> spandankumarsahu/smartkt:proxy_latest

  • After building, you must login to Dockerhub:

    sudo docker login

  • After login, you can now push the new docker image as:

    sudo docker push <containerName> spandankumarsahu/smartkt:proxy_latest

Please note that, for noproxy image, we have a noproxy branch. After releasing the proxy-version, and pushing the code on Github, simply rebase the noproxy branch onto the proxy branch, and the system will build and push the non-proxy based Docker image to Dockerhub.

smartkt's People

Contributors

smartkt avatar thegrayfrost avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.