From b7fc99fe752222f3c7f1b969f30f0dd01d7abe81 Mon Sep 17 00:00:00 2001 From: yuxuan1206 <610939662@qq.com> Date: Fri, 10 May 2024 22:17:39 +0800 Subject: [PATCH] add setup.sh --- third-party/kaolin/.dockerignore | 5 +++ third-party/kaolin/.drone.yml | 53 +++++++++++++++++++++++++++++ third-party/kaolin/.flake8 | 13 +++++++ third-party/kaolin/.readthedocs.yml | 14 ++++++++ third-party/setup.sh | 25 ++++++++++++++ 5 files changed, 110 insertions(+) create mode 100644 third-party/kaolin/.dockerignore create mode 100644 third-party/kaolin/.drone.yml create mode 100644 third-party/kaolin/.flake8 create mode 100644 third-party/kaolin/.readthedocs.yml create mode 100755 third-party/setup.sh diff --git a/third-party/kaolin/.dockerignore b/third-party/kaolin/.dockerignore new file mode 100644 index 0000000..8b88676 --- /dev/null +++ b/third-party/kaolin/.dockerignore @@ -0,0 +1,5 @@ +**/.git +ci +.gitlab-ci.yml +**/.gitignore +**/.gitmodules diff --git a/third-party/kaolin/.drone.yml b/third-party/kaolin/.drone.yml new file mode 100644 index 0000000..c40cc67 --- /dev/null +++ b/third-party/kaolin/.drone.yml @@ -0,0 +1,53 @@ +kind: pipeline +type: docker +name: default + +environment: + CUDA_VERSION: "10.1" + PYTORCH_VERSION: "1.6" + CUDNN_VERSION: "7" + TORCH_CUDA_ARCH_LIST: "5.2 6.0 6.1 7.0 7.5+PTX" + KAOLIN_INSTALL_EXPERIMENTAL: "1" + +steps: +- name: submodules + image: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 + commands: + - apt-get update && apt-get install -y git + - git submodule update --init --recursive + +- name: flake8 + image: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 + commands: + - > + apt-get update && apt-get install -y --no-install-recommends + python3-pip + - pip3 install --upgrade pip>=19.3 + - pip install -r tools/ci_requirements.txt + - flake8 --config=.flake8 . + +- name: pytest + image: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 + commands: + - > + apt-get update && apt-get install -y --no-install-recommends + build-essential + curl + && apt-get clean + && rm -rf /var/lib/apt/lists/* + - > + curl -o ~/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && + sh ~/miniconda.sh -b -p /opt/conda && + /opt/conda/bin/conda install -y python=3.7 && + /opt/conda/bin/conda clean -ya + - export PATH=/opt/conda/bin:$PATH + - pip install --upgrade pip>=19.3 + - conda install -y pytorch==1.6 cudatoolkit=10.1 -c pytorch + - conda install -c conda-forge nodejs + - > + apt-get update && apt-get install -y --no-install-recommends + libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb + - npm install + - python setup.py develop + - pip install -r tools/ci_requirements.txt + - pytest --cov=kaolin/ tests/python tests/integration && pytest --doctest-modules kaolin/ diff --git a/third-party/kaolin/.flake8 b/third-party/kaolin/.flake8 new file mode 100644 index 0000000..1797daa --- /dev/null +++ b/third-party/kaolin/.flake8 @@ -0,0 +1,13 @@ +[flake8] +select = B,C,E,F,P,T4,W,B9 +max-line-length = 120 +# C408 ignored because we like the dict keyword argument syntax +# E501 is not flexible enough, we're using B950 instead +ignore = + E203,E305,E402,E501,E721,E741,F403,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303, + # these ignores are from flake8-bugbear; please fix! + B007,B008, + # these ignores are from flake8-comprehensions; please fix! + C400,C401,C402,C403,C404,C405,C407,C411 +per-file-ignores = __init__.py: F401 +exclude = .git, tests/, build/, _build/, .eggs/ diff --git a/third-party/kaolin/.readthedocs.yml b/third-party/kaolin/.readthedocs.yml new file mode 100644 index 0000000..2e57d27 --- /dev/null +++ b/third-party/kaolin/.readthedocs.yml @@ -0,0 +1,14 @@ +version: 2 + +python: + version: 3.7 + system_packages: true + install: + - requirements: docs/readthedocs_requirements.txt + - requirements: tools/doc_requirements.txt + - method: setuptools + path: '.' + +sphinx: + configuration: docs/conf.py + fail_on_warning: true diff --git a/third-party/setup.sh b/third-party/setup.sh new file mode 100755 index 0000000..36aec90 --- /dev/null +++ b/third-party/setup.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +cd kaolin +python setup.py develop + +cd - +cd kaolin-wisp +python setup.py develop + +cd - +git clone --recursive https://github.com/princeton-vl/lietorch.git +cd lietorch +python setup.py install + +cd - +git clone https://github.com/fogleman/sdf.git +cd sdf +pip install -e . + +cd - +git clone https://github.com/autonomousvision/kitti360Scripts.git +cd kitti360Scripts +CYTHONIZE_EVAL= python setup.py build_ext --inplace +CYTHONIZE_EVAL= python setup.py install +