KingHacker9000 commited on
Commit
9cf01b3
·
1 Parent(s): d3d4cc6

switch setup-6

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -3
Dockerfile CHANGED
@@ -6,7 +6,7 @@ FROM ghcr.io/huggingface/text-generation-inference:3.3.4@sha256:91822fefc613d742
6
  RUN apt-get update && \
7
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
8
  build-essential git cmake ninja-build pkg-config curl ca-certificates gnupg software-properties-common \
9
- python3-pip python3.11 python3.11-dev python3.11-venv tzdata && \
10
  # Preconfigure timezone to UTC
11
  ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata && \
12
  # Add CUDA keyring and repository
@@ -32,7 +32,15 @@ RUN python3 -m pip install --upgrade pip && \
32
  RUN git clone --depth 1 --recursive https://github.com/BachiLi/diffvg.git /tmp/diffvg && \
33
  # Lower cmake requirement for pybind11
34
  sed -i 's/^\s*cmake_minimum_required(VERSION .*$/cmake_minimum_required(VERSION 3.5)/' /tmp/diffvg/pybind11/CMakeLists.txt && \
35
- cd /tmp/diffvg && \
36
- python3 setup.py install && \
 
 
 
 
 
 
 
 
37
  cd / && rm -rf /tmp/diffvg
38
 
 
6
  RUN apt-get update && \
7
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
8
  build-essential git cmake ninja-build pkg-config curl ca-certificates gnupg software-properties-common \
9
+ python3-pip python3.11 python3.11-dev python3.11-venv python3.11-distutils tzdata && \
10
  # Preconfigure timezone to UTC
11
  ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata && \
12
  # Add CUDA keyring and repository
 
32
  RUN git clone --depth 1 --recursive https://github.com/BachiLi/diffvg.git /tmp/diffvg && \
33
  # Lower cmake requirement for pybind11
34
  sed -i 's/^\s*cmake_minimum_required(VERSION .*$/cmake_minimum_required(VERSION 3.5)/' /tmp/diffvg/pybind11/CMakeLists.txt && \
35
+ mkdir /tmp/diffvg/build && cd /tmp/diffvg/build && \
36
+ cmake .. \
37
+ -DPYTHON_EXECUTABLE=$(which python3) \
38
+ -DPython3_ROOT_DIR=$(python3 -c "import sys; print(sys.prefix)") \
39
+ -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.11.so \
40
+ -DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \
41
+ -DCMAKE_BUILD_TYPE=Release \
42
+ -DDIFFVG_CUDA=0 && \
43
+ make -j$(nproc) && \
44
+ make install && \
45
  cd / && rm -rf /tmp/diffvg
46