Commit
·
149e0d8
1
Parent(s):
ede8129
switch setup-10
Browse files- 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 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|