Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ eval "$(conda shell.bash hook)"

conda create --name svgrender python=3.10 --yes
conda activate svgrender
export PYTHONNOUSERSITE=1
echo "The conda environment was successfully created"

# Install PyTorch and related libraries
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch --yes
echo "Pytorch installation is complete. version: 1.12.1"

# Install xformers
conda install xformers -c xformers --yes
echo "xformers installation is complete."
# Install PyTorch, xformers and related libraries
pip install torch torchvision xformers --index-url https://download.pytorch.org/whl/cu128
echo "Pytorch installation is complete."

# Install common Python dependencies
pip install hydra-core omegaconf
pip install freetype-py shapely svgutils
pip install opencv-python scikit-image matplotlib visdom wandb BeautifulSoup4
pip install triton numba
pip install numpy scipy scikit-fmm einops timm fairscale==0.4.13
pip install accelerate transformers safetensors datasets
pip install safetensors
pip install "huggingface_hub<0.25.0" "transformers==4.35.2" "accelerate==0.25.0" "datasets==2.15.0"
pip install easydict scikit-learn pytorch_lightning==2.1.0 webdataset
echo "The basic dependency library is installed."

Expand All @@ -41,18 +39,22 @@ git clone https://github.com/BachiLi/diffvg.git
cd diffvg
git submodule update --init --recursive

sed -i 's/cmake_minimum_required(VERSION 3.4)/cmake_minimum_required(VERSION 3.10)/g' pybind11/CMakeLists.txt
export DIFFVG_CUDA=1

# Install system dependencies for Ubuntu (to avoid potential issues)
echo "Installing system dependencies for DiffVG..."
sudo apt update
sudo apt install -y cmake ffmpeg build-essential libjpeg-dev libpng-dev libtiff-dev

conda install -y -c anaconda cmake
conda install -y -c conda-forge ffmpeg
pip install svgwrite svgpathtools cssutils torch-tools

# Install DiffVG
python setup.py install
echo "DiffVG installation is complete."

pip install svgwrite svgpathtools cssutils

# Final confirmation
echo "The running environment has been successfully installed!!!"