From a7771b2b416d20615492163993275444d6ae751e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= <969523+alaendle@users.noreply.github.com> Date: Sun, 14 Jun 2026 10:30:01 +0200 Subject: [PATCH] Next try for `libtorch-ffi` dependencies (#8039). --- Dockerfile | 3 +-- docker/03-custom-install.sh | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52a7b4e5..b049c6d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ COPY docker/02-apt-get-install.sh /tmp/02-apt-get-install.sh RUN /tmp/02-apt-get-install.sh && rm /tmp/02-apt-get-install.sh ENV LIBTORCH_VERSION 2.5.0 -ENV LIBTORCH_HOME /usr/local/libtorch ENV LIBTORCH_CUDA_VERSION cpu ENV LIBTORCH_SKIP_DOWNLOAD 1 @@ -21,4 +20,4 @@ COPY docker/04-cleanup.sh /tmp/04-cleanup.sh RUN /tmp/04-cleanup.sh && rm /tmp/04-cleanup.sh # Include file path -ENV CPATH /usr/lib/jvm/java-8-openjdk-amd64/include:/usr/lib/jvm/java-8-openjdk-amd64/include/linux:/usr/lib/llvm-3.7/include:/usr/local/libtorch/include +ENV CPATH /usr/lib/jvm/java-8-openjdk-amd64/include:/usr/lib/jvm/java-8-openjdk-amd64/include/linux:/usr/lib/llvm-3.7/include diff --git a/docker/03-custom-install.sh b/docker/03-custom-install.sh index 7c3c11a4..d5ac93cb 100755 --- a/docker/03-custom-install.sh +++ b/docker/03-custom-install.sh @@ -69,5 +69,7 @@ Z3_VER=4.13.4 # Install libtorch curl -OL https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip unzip libtorch-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip -d /usr/local/ +mv /usr/local/libtorch/lib/* /usr/lib/ +mv /usr/local/libtorch/include/* /usr/include/ rm libtorch-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip -mv /usr/local/libtorch/lib/lib* /usr/lib/ +rm -rf /usr/local/libtorch