Skip to content

Commit

Permalink
Improve build error detection
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Dec 12, 2023
1 parent b0c3d0b commit fd8d7e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
python:
- "3.10"
- "3.11"
- "3.12"
pytorch:
- "2.0.1"
- "2.1.0"
Expand Down Expand Up @@ -83,7 +82,6 @@ jobs:
python:
- "3.10"
- "3.11"
- "3.12"
pytorch:
- "2.0.1"
- "2.1.0"
Expand All @@ -92,22 +90,17 @@ jobs:
- "11.7.1"
- "11.8.0"
- "12.1.0"
- "12.2.0"
level:
- "base"
- "devel"
- "cudnn8-devel"
exclude:
- pytorch: "2.0.1"
cuda: "12.1.0"
- pytorch: "2.0.1"
cuda: "12.2.0"
- pytorch: "2.1.0"
cuda: "11.7.1"
- pytorch: "2.1.1"
cuda: "11.7.1"
- cuda: "12.2.0"
level: "cudnn8-devel"
- cuda: "12.1.0"
level: "devel"
- cuda: "11.8.0"
Expand Down Expand Up @@ -171,7 +164,6 @@ jobs:
python:
- "3.10"
- "3.11"
- "3.12"
pytorch:
- "2.0.1"
- "2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion build/COPY_ROOT/opt/ai-dock/bin/build/layer0/init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Must exit and fail to build if any command fails
set -e
set -eo pipefail

/opt/ai-dock/bin/build/layer0/common.sh

Expand Down
8 changes: 5 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ COPY ./COPY_ROOT/ /
# Don't put anything heavy in here - We can use multi-stage building above if necessary.
ARG PYTORCH_VERSION
ENV PYTORCH_VERSION=${PYTORCH_VERSION}
RUN /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log

# Copy overrides and new files into a final layer for fast rebuilds
COPY ./COPY_ROOT_EXTRA/ /
RUN set -eo pipefail && /opt/ai-dock/bin/build/layer0/init.sh | tee /var/log/build.log

# Copy overrides and new files into a final layer for fast rebuilds. Uncomment below
#COPY ./COPY_ROOT_EXTRA/ /
#RUN set -eo pipefail && /opt/ai-dock/bin/build/layer1/init.sh | tee -a /var/log/build.log

# Keep init.sh as-is and place additional logic in /opt/ai-dock/bin/preflight.sh
CMD ["init.sh"]

0 comments on commit fd8d7e4

Please sign in to comment.