-
Notifications
You must be signed in to change notification settings - Fork 134
Installation
The easiest way to get started is to use Docker or the Azure button above (which requires an Azure account). It is highly recommended that you run Counterfit inside a Docker container instance or install Counterfit in a virtual environment.
To run Counterfit from your browser
-
Click the button below to initiate small resource deployment to your Azure account.
-
In the configuration blade, specify your subscription and resource group.
-
In your Azure Shell, type the following, replacing
RESOURCE_GROUP
with the name of the resource group selected in the previous step.
az container exec --resource-group RESOURCE_GROUP –name counterfit –exec-command '/bin/bash'
- Within the container, launch Counterfit.
python counterfit.py
- Install Docker Desktop
- Execute Counterfit as follows
docker run -it [counterfit_image] python counterfit.py
- Install Anaconda Python.
- Create a virtual environment via conda.
$> conda create -n counterfit-venv python=3.7
$> conda activate counterfit-venv
$> (conda activate) git clone https://github.com/Azure/counterfit.git
$> (counterfit-venv) pip install -r requirements.txt
$> (counterfit-venv) python counterfit.py
1.Create a virtual environment.
$> Python -m venv counterfit-venv
- Activate virtual environment.
$> counterfit-venv\Scripts\activate.bat
$> source counterfit-venv/bin/activate
3.Install requirements
$> (counterfit-venv) pip install -r requirements.txt
- Clone the repository and install the requirements.
$> git clone https://github.com/Azure/counterfit.git
$> cd counterfit
$> pip install -r requirements.txt
$> python counterfit.py
- Use your container service of choice.
- Pull the Docker image
Docker pull [image:tag]
- Execute the image
docker run -it [counterfit_image] python counterfit.py
Note: There is a known bug installing TextAttack on Windows. A workaround is to download paramcf manually, change the file extension to .zip, extract it, and drop the extracted paramcf folder into c:\users\user.cache. See Frameworks for more information on the caching mechanism.