Skip to content

Commit

Permalink
Merge pull request #1290 from consideRatio/pr/cleanup-outdated-arch-b…
Browse files Browse the repository at this point in the history
…uilds

Removal of outdated ppc64le arch Dockerfile
  • Loading branch information
romainx committed May 22, 2021
2 parents 894df89 + eabfdfe commit ed559b6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 256 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Expand Up @@ -11,7 +11,6 @@ repos:
- id: hadolint-docker
# FIXME: remove after https://github.com/hadolint/hadolint/issues/628 is resolved
entry: hadolint/hadolint:v2.3.0 hadolint
exclude: Dockerfile.ppc64le|Dockerfile.ppc64le.patch
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.26.1
hooks:
Expand Down
19 changes: 2 additions & 17 deletions Makefile
Expand Up @@ -4,13 +4,9 @@

# Use bash for inline if-statements in arch_patch target
SHELL:=bash
ARCH:=$(shell uname -m)
OWNER?=jupyter

# Need to list the images in build dependency order
ifeq ($(ARCH),ppc64le)
ALL_IMAGES:=base-notebook
else
ALL_IMAGES:=base-notebook \
minimal-notebook \
r-notebook \
Expand All @@ -19,7 +15,6 @@ ALL_IMAGES:=base-notebook \
datascience-notebook \
pyspark-notebook \
all-spark-notebook
endif

# Enable BuildKit for Docker build
export DOCKER_BUILDKIT:=1
Expand All @@ -32,24 +27,14 @@ help:
@echo
@grep -E '^[a-zA-Z0-9_%/-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

arch_patch/%: ## apply hardware architecture specific patches to the Dockerfile
@if [ -e ./$(notdir $@)/Dockerfile.$(ARCH).patch ]; then \
if [ -e ./$(notdir $@)/Dockerfile.orig ]; then \
cp -f ./$(notdir $@)/Dockerfile.orig ./$(notdir $@)/Dockerfile; \
else \
cp -f ./$(notdir $@)/Dockerfile ./$(notdir $@)/Dockerfile.orig; \
fi; \
patch -f ./$(notdir $@)/Dockerfile ./$(notdir $@)/Dockerfile.$(ARCH).patch; \
fi

build/%: DARGS?=
build/%: ## build the latest image for a stack
docker build $(DARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@)
@echo -n "Built image size: "
@docker images $(OWNER)/$(notdir $@):latest --format "{{.Size}}"

build-all: $(foreach I,$(ALL_IMAGES),arch_patch/$(I) build/$(I) ) ## build all stacks
build-test-all: $(foreach I,$(ALL_IMAGES),arch_patch/$(I) build/$(I) test/$(I) ) ## build and test all stacks
build-all: $(foreach I,$(ALL_IMAGES), build/$(I) ) ## build all stacks
build-test-all: $(foreach I,$(ALL_IMAGES), build/$(I) test/$(I) ) ## build and test all stacks

check-outdated/%: ## check the outdated conda packages in a stack and produce a report (experimental)
@TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test/test_outdated.py
Expand Down
136 changes: 0 additions & 136 deletions base-notebook/Dockerfile.ppc64le

This file was deleted.

102 changes: 0 additions & 102 deletions base-notebook/Dockerfile.ppc64le.patch

This file was deleted.

0 comments on commit ed559b6

Please sign in to comment.