Skip to content

Commit

Permalink
okay well maybe try doing pytorch *first*
Browse files Browse the repository at this point in the history
  • Loading branch information
steveri committed Sep 25, 2023
1 parent bf10a1b commit 21fe24e
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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 && \
Expand Down

0 comments on commit 21fe24e

Please sign in to comment.