KingHacker9000 commited on
Commit
149e0d8
·
1 Parent(s): ede8129

switch setup-10

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -13
Dockerfile CHANGED
@@ -28,17 +28,22 @@ RUN python3 -m pip install --upgrade pip && \
28
  python3 -m pip install \
29
  torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
30
 
31
- # Build and install diffvg with Python 3.11 compatibility
32
- RUN git clone --depth 1 --recursive https://github.com/BachiLi/diffvg.git /tmp/diffvg \
33
- && rm -rf /tmp/diffvg/pybind11 \
34
- && git clone --depth 1 --branch v2.12.1 https://github.com/pybind/pybind11.git /tmp/diffvg/pybind11 \
35
- && sed -i 's/^\s*cmake_minimum_required(VERSION .*$/cmake_minimum_required(VERSION 3.5)/' /tmp/diffvg/pybind11/CMakeLists.txt \
36
- && mkdir /tmp/diffvg/build && cd /tmp/diffvg/build \
37
- && cmake .. \
38
- -DCMAKE_BUILD_TYPE=Release \
39
- -DCMAKE_CXX_STANDARD=14 \
40
- -DDIFFVG_CUDA=0 \
41
- && make -j$(nproc) \
42
- && cd /tmp/diffvg && python3 setup.py install \
43
- && rm -rf /tmp/diffvg
 
 
 
 
 
44
 
 
28
  python3 -m pip install \
29
  torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
30
 
31
+ RUN \
32
+ # Clone diffvg recursively so we get the thrust submodule too
33
+ git clone --depth 1 --recursive https://github.com/BachiLi/diffvg.git /tmp/diffvg && \
34
+ cd /tmp/diffvg && \
35
+ # Replace bundled pybind11 with the released v2.12.1
36
+ rm -rf pybind11 && \
37
+ git clone --depth 1 --branch v2.12.1 https://github.com/pybind/pybind11.git pybind11 && \
38
+ sed -i 's/^\s*cmake_minimum_required(VERSION .*$/cmake_minimum_required(VERSION 3.5)/' pybind11/CMakeLists.txt && \
39
+ # Configure & build without CUDA
40
+ mkdir build && cd build && \
41
+ cmake .. \
42
+ -DCMAKE_BUILD_TYPE=Release \
43
+ -DCMAKE_CXX_STANDARD=14 \
44
+ -DDIFFVG_CUDA=0 && \
45
+ make -j$(nproc) && \
46
+ # Install and clean up
47
+ cd /tmp/diffvg && python3 setup.py install && \
48
+ rm -rf /tmp/diffvg
49