diff --git a/script/install.sh b/script/install.sh index 1a2472f..b5df184 100644 --- a/script/install.sh +++ b/script/install.sh @@ -7,15 +7,12 @@ 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 @@ -23,7 +20,8 @@ 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." @@ -41,6 +39,9 @@ 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 @@ -48,11 +49,12 @@ sudo apt install -y cmake ffmpeg build-essential libjpeg-dev libpng-dev libtiff- 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!!!"