pyre-check is an open source tool developed and maintained by Facebook to perform Static Code Analysis (SCA) on Python applications.
This Docker image builds pyre-check from source for a quicker & painless setup (especially on systems that are not yet officially supported)!
It runs Debian GNU/Linux 10 (buster) and has been tested on the Apple M1.
Before starting, ensure that Docker is installed on your computer.
-
Clone this repository and navigate into it
git clone https://github.com/gracewgao/pyre-docker cd pyre-docker
-
Build the Docker image with the tag
pyre-check
(or another tag if you wish)docker build -t pyre-docker .
-
Run the new image in a new container
pyre-container
(or another name if you wish)docker run \ --name pyre-container \ -v /path/to/your/directory:/src \ -t -i \ pyre-check /bin/bash
-
Inside the container, run any pyre-check command now with
pyre
!Note: When initializing pyre-check with
pyre init
, you may have to enter the following paths for the binary and typeshed:ƛ No `pyre.bin` found, enter the path manually: /home/opam/pyre-check/source/_build/default/main.exe ƛ Unable to locate typeshed, please enter its root: /home/opam/pyre-check/stubs/typeshed/typeshed-master
Feel free to report any bugs or installation errors that you find!