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 2176d71
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,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
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
3 changes: 3 additions & 0 deletions build/COPY_ROOT_EXTRA/opt/ai-dock/bin/build/layer1/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

# Override this file to add extras to your build
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 2176d71

Please sign in to comment.