jree423 commited on
Commit
dcf6618
·
verified ·
1 Parent(s): 7e2f858

Upload DiffSketcher/script/install.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. DiffSketcher/script/install.sh +58 -0
DiffSketcher/script/install.sh ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Conda setup and environment creation
6
+ eval "$(conda shell.bash hook)"
7
+
8
+ conda create --name svgrender python=3.10 --yes
9
+ conda activate svgrender
10
+ echo "The conda environment was successfully created"
11
+
12
+ # Install PyTorch and related libraries
13
+ conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch --yes
14
+ echo "Pytorch installation is complete. version: 1.12.1"
15
+
16
+ # Install xformers
17
+ conda install xformers -c xformers --yes
18
+ echo "xformers installation is complete."
19
+
20
+ # Install common Python dependencies
21
+ pip install hydra-core omegaconf
22
+ pip install freetype-py shapely svgutils
23
+ pip install opencv-python scikit-image matplotlib visdom wandb BeautifulSoup4
24
+ pip install triton numba
25
+ pip install numpy scipy scikit-fmm einops timm fairscale==0.4.13
26
+ pip install accelerate transformers safetensors datasets
27
+ pip install easydict scikit-learn pytorch_lightning==2.1.0 webdataset
28
+ echo "The basic dependency library is installed."
29
+
30
+ # Additional utility libraries
31
+ pip install ftfy regex tqdm
32
+ pip install git+https://github.com/openai/CLIP.git
33
+ echo "CLIP installation is complete."
34
+
35
+ # Install diffusers
36
+ pip install diffusers==0.20.2
37
+ echo "Diffusers installation is complete. version: 0.20.2"
38
+
39
+ # Clone and set up DiffVG, handling dependencies on Ubuntu
40
+ git clone https://github.com/BachiLi/diffvg.git
41
+ cd diffvg
42
+ git submodule update --init --recursive
43
+
44
+ # Install system dependencies for Ubuntu (to avoid potential issues)
45
+ echo "Installing system dependencies for DiffVG..."
46
+ sudo apt update
47
+ sudo apt install -y cmake ffmpeg build-essential libjpeg-dev libpng-dev libtiff-dev
48
+
49
+ conda install -y -c anaconda cmake
50
+ conda install -y -c conda-forge ffmpeg
51
+ pip install svgwrite svgpathtools cssutils torch-tools
52
+
53
+ # Install DiffVG
54
+ python setup.py install
55
+ echo "DiffVG installation is complete."
56
+
57
+ # Final confirmation
58
+ echo "The running environment has been successfully installed!!!"