-
Notifications
You must be signed in to change notification settings - Fork 130
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
- Install Docker Desktop
- Execute Counterfit as follows
docker run -it azuretrustworthyml/counterfit:latest python counterfit.py
- Install Docker Desktop
- Pull and execute Counterfit-Jupyterlab as follows
docker pull azuretrustworthyml/counterfit-jupyterlab:latest docker run -p8888:8888 azuretrustworthyml/counterfit-jupyterlab:latest
- Navigate your browser to the URL specified that includes a token, e.g.,
http://127.0.0.1:8888/lab?token=<token>
-
Install Anaconda Python and git.
-
Clone the repository.
git clone https://github.com/Azure/counterfit.git
-
Open an Anaconda shell and create a virtual environment and install dependencies.
conda update -c conda-forge --all -y conda create --yes -n counterfit python=3.8.0 conda activate counterfit git clone -b main https://github.com/Azure/counterfit.git cd counterfit pip install .[dev]
-
Launch Counterfit
counterfit
-
Clone the repository.
git clone https://github.com/Azure/counterfit.git cd counterfit
-
Create a virtual environment and install dependencies.
python3 -m venv counterfit-venv # Activate virtual environment (Linux) source counterfit-venv/bin/activate # Activate virtual environment (Windows) counterfit-venv\scripts\activate.bat pip install .[dev]
-
Launch Counterfit CLI
counterfit
- Use your container service of choice.
- Pull the Docker image
Docker pull azuretrustworthyml/counterfit:1.1
- Execute the image
docker run -it azuretrustworthyml/counterfit:1.1 counterfit
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.