mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-06-28 09:15:47 +02:00
New strategy - do not preinstall libtorch - but try to cache it by placing it under ~/work (#8039).
This commit is contained in:
parent
12bff3a2cd
commit
cbae8ca357
@ -9,10 +9,6 @@ RUN /tmp/01-build-server.sh && rm /tmp/01-build-server.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
|
||||
|
||||
ENV LIBTORCH_VERSION=2.5.0
|
||||
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
|
||||
|
||||
@ -21,3 +17,6 @@ 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
|
||||
|
||||
# Download libtorch into mounted work volume (so that artifact is shared on rebuilds)
|
||||
ENV LIBTORCH_HOME=~/work/libtorch
|
||||
|
||||
@ -65,12 +65,3 @@ Z3_VER=4.13.4
|
||||
&& rm z3-${Z3_VER}-x64-glibc-2.35.zip \
|
||||
&& ln -s /usr/local/z3-${Z3_VER}-x64-glibc-2.35/bin/z3 /usr/bin/z3
|
||||
)
|
||||
|
||||
# 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/
|
||||
cp -rf /usr/local/libtorch/lib/* /usr/lib/
|
||||
cp -rf /usr/local/libtorch/include/* /usr/include/
|
||||
cp -rf /usr/local/libtorch/include/torch/csrc/api/include/* /usr/include/
|
||||
rm libtorch-shared-with-deps-$LIBTORCH_VERSION%2Bcpu.zip
|
||||
rm -rf /usr/local/libtorch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user