Skip to content

Commit

Permalink
macoc installation
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsey98 committed Aug 12, 2024
1 parent 837ec7b commit d42b20c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4,114 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,18 @@ Requirements:
git clone https://github.com/lindsey98/Phishpedia.git
```

2. Setup
2. Setup the phishpedia conda environment.
In this step, we would be installing the core dependencies of Phishpedia such as pytorch, detectron2, and paddlepaddle.
In addition, we would also download the model checkpoints and brand reference list.
This step may take some time.
```bash
chmod +x ./setup.sh
export ENV_NAME="phishpedia" && ./setup.sh
export ENV_NAME="phishpedia"
./setup.sh
```

3.
```
```bash
conda activate phishpedia
```

Expand Down
Binary file not shown.
4,106 changes: 0 additions & 4,106 deletions datasets/test_sites/accounts.g.cdcde.com/html.txt

This file was deleted.

1 change: 0 additions & 1 deletion datasets/test_sites/accounts.g.cdcde.com/info.txt

This file was deleted.

Binary file removed datasets/test_sites/accounts.g.cdcde.com/shot.png
Binary file not shown.
8 changes: 4 additions & 4 deletions setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ OS=$(uname -s)
if [[ "$OS" == "Darwin" ]]; then
echo "Installing PyTorch and torchvision for macOS."
conda run -n "$ENV_NAME" pip install torch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0
conda run -n "$ENV_NAME" python -m pip install detectron2 -f "https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.9/index.html"
conda run -n "$ENV_NAME" python -m pip install paddlepaddle==2.5.1 -i https://mirror.baidu.com/pypi/simple
conda run -n "$ENV_NAME" python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
conda run -n "$ENV_NAME" python -m pip install paddlepaddle==2.6.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
else
# Check if NVIDIA GPU is available for Linux and Windows
if command -v nvcc || command -v nvidia-smi &> /dev/null; then
echo "CUDA is detected, installing GPU-supported PyTorch and torchvision."
conda run -n "$ENV_NAME" pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f "https://download.pytorch.org/whl/torch_stable.html"
conda run -n "$ENV_NAME" python -m pip install detectron2 -f "https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.9/index.html"
conda run -n "$ENV_NAME" python -m pip install paddlepaddle-gpu==2.5.1 -i https://mirror.baidu.com/pypi/simple
conda run -n "$ENV_NAME" python -m pip install paddlepaddle-gpu==2.6.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
else
echo "No CUDA detected, installing CPU-only PyTorch and torchvision."
conda run -n "$ENV_NAME" pip install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f "https://download.pytorch.org/whl/torch_stable.html"
conda run -n "$ENV_NAME" python -m pip install detectron2 -f "https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.9/index.html"
conda run -n "$ENV_NAME" python -m pip install paddlepaddle==2.5.1 -i https://mirror.baidu.com/pypi/simple
conda run -n "$ENV_NAME" python -m pip install paddlepaddle==2.6.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
fi
fi

Expand Down

0 comments on commit d42b20c

Please sign in to comment.