From 21fe24e64844a8df69784a49df7510504bee396e Mon Sep 17 00:00:00 2001 From: steveri Date: Mon, 25 Sep 2023 15:52:14 -0700 Subject: [PATCH] okay well maybe try doing pytorch *first* --- Dockerfile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56b87de6..ae9a8163 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,6 +77,20 @@ RUN printf -- "--- TIME %s %s\n" `date +%H:%M` tools \ RUN printf -- "--- TIME %s %s\n" `date +%H:%M` pythunder && \ python -m pip install -e cgra_pnr/thunder +# Fail early, fail often +# Install torch (need big tmp folder) +WORKDIR /aha +# Save (and later restore) existing value for TMPDIR, if any +ENV TMPTMPDIR=$TMPDIR +ENV TMPDIR=/aha/tmp/torch_install/ +RUN printf -- "--- TIME %s %s\n" `date +%H:%M` torch && \ + mkdir -p /aha/tmp/torch_install/ && \ + source /aha/bin/activate && \ + pip install --cache-dir=$TMPDIR --build=$TMPDIR torch==1.7.1+cpu -f https://download.pytorch.org/whl/torch_stable.html && \ + /bin/rm -rf $TMPDIR +# Restore original value of TMPDIR +ENV TMPDIR=$TMPTMPDIR + # Pono COPY ./pono /aha/pono COPY ./aha/bin/setup-smt-switch.sh /aha/pono/contrib/ @@ -150,21 +164,6 @@ RUN printf -- "--- TIME %s %s\n" `date +%H:%M` sam && \ make sam && \ source /aha/bin/activate && pip install scipy numpy pytest && pip install -e . -# Save (and later restore) existing value for TMPDIR, if any -ENV TMPTMPDIR=$TMPDIR -ENV TMPDIR=/aha/tmp/torch_install/ - -# Install torch (need big tmp folder) -WORKDIR /aha -RUN printf -- "--- TIME %s %s\n" `date +%H:%M` torch && \ - mkdir -p /aha/tmp/torch_install/ && \ - source /aha/bin/activate && \ - pip install --cache-dir=$TMPDIR --build=$TMPDIR torch==1.7.1+cpu -f https://download.pytorch.org/whl/torch_stable.html && \ - /bin/rm -rf $TMPDIR - -# Restore original value of TMPDIR -ENV TMPDIR=$TMPTMPDIR - # FIXME this is top level stuff why don't we do this FIRST? WORKDIR /aha RUN printf -- "--- TIME %s %s\n" `date +%H:%M` misc && \