From aa97d8c006e9038f3dd20e6667c7b398e9e04ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20L=C3=A4ndle?= <969523+alaendle@users.noreply.github.com> Date: Sat, 13 Jun 2026 19:44:36 +0200 Subject: [PATCH] Keep LIBTORCH environment variables for building. --- Dockerfile | 13 +++++++++---- docker/03-custom-install.sh | 4 ---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 08c51e73..cffc7361 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,16 +3,21 @@ FROM ubuntu:24.04 ENV HOME /home/stackage ENV LANG en_US.UTF-8 -ADD docker/01-build-server.sh /tmp/01-build-server.sh +COPY docker/01-build-server.sh /tmp/01-build-server.sh RUN /tmp/01-build-server.sh && rm /tmp/01-build-server.sh -ADD docker/02-apt-get-install.sh /tmp/02-apt-get-install.sh +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 -ADD docker/03-custom-install.sh /tmp/03-custom-install.sh +ENV LIBTORCH_VERSION 2.5.0 +ENV LIBTORCH_HOME /usr/local/libtorch +ENV LIBTORCH_CUDA_VERSION cpu +ENV LIBTORCH_SKIP_DOWNLOAD 1 + +COPY docker/03-custom-install.sh /tmp/03-custom-install.sh RUN /tmp/03-custom-install.sh && rm /tmp/03-custom-install.sh -ADD docker/04-cleanup.sh /tmp/04-cleanup.sh +COPY docker/04-cleanup.sh /tmp/04-cleanup.sh RUN /tmp/04-cleanup.sh && rm /tmp/04-cleanup.sh # Include file path diff --git a/docker/03-custom-install.sh b/docker/03-custom-install.sh index 8227a0ca..14ba0dee 100755 --- a/docker/03-custom-install.sh +++ b/docker/03-custom-install.sh @@ -67,10 +67,6 @@ Z3_VER=4.13.4 ) # Install libtorch -LIBTORCH_VERSION=2.5.0 -LIBTORCH_HOME=/usr/local/libtorch -LIBTORCH_CUDA_VERSION=cpu -LIBTORCH_SKIP_DOWNLOAD=1 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/ rm libtorch-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip