Skip to content

Commit

Permalink
do not build 3.8 gpu for now
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalSkolasinski committed Aug 9, 2021
1 parent f743992 commit d353bb3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions wrappers/s2i/python/Dockerfile.conda
Expand Up @@ -11,8 +11,8 @@ ENV PATH /opt/conda/bin:$PATH
RUN dnf update -y && \
dnf install -y wget bzip2 ca-certificates curl git

ARG CONDA_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-$CONDA_VERSION-Linux-x86_64.sh -O ~/miniconda.sh && \
ARG CONDA_DOWNLOAD_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_DOWNLOAD_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
Expand Down
5 changes: 3 additions & 2 deletions wrappers/s2i/python/Dockerfile.gpu
Expand Up @@ -16,8 +16,8 @@ RUN apt-get update -y && apt-get install -qy --no-install-recommends \
ENV PATH /opt/conda/bin:$PATH

# Install Miniconda3
ARG CONDA_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
ARG CONDA_DOWNLOAD_VERSION
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_DOWNLOAD_VERSION}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
Expand All @@ -30,6 +30,7 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}

# This is to install desired version of Python without updating conda version
ARG PYTHON_VERSION
ARG CONDA_VERSION
RUN conda install --yes python=$PYTHON_VERSION conda=$CONDA_VERSION
RUN apt-get update --yes && apt-get install --yes gcc make build-essential

Expand Down
13 changes: 8 additions & 5 deletions wrappers/s2i/python/Makefile
Expand Up @@ -2,7 +2,10 @@ IMAGE_VERSION := $(shell cat ../../../version.txt)
SHELL:=/bin/bash

PYTHON_VERSION=3.7.10
CONDA_VERSION=4.7.12

CONDA_DOWNLOAD_VERSION=4.7.12
CONDA_VERSION=4.10.3

IMAGE_PYTHON_VERSION=`echo -n $(PYTHON_VERSION) | cut -d. -f1-2 | sed 's/\.//g'`
DEFAULT_IMAGE_PYTHON_VERSION=`echo -n $(PYTHON_VERSION) | cut -d. -f1`
IMAGE_NAME = docker.io/seldonio/seldon-core-s2i-python${IMAGE_PYTHON_VERSION}
Expand All @@ -24,12 +27,12 @@ get_local_repo:

.PHONY: build
build: get_local_repo
set -x && docker build -f Dockerfile.local --build-arg IMAGE_VERSION=${IMAGE_VERSION} --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${CONDA_BASE_IMAGE} -t $(IMAGE_NAME):$(IMAGE_VERSION) .
set -x && docker build -f Dockerfile --build-arg IMAGE_VERSION=${IMAGE_VERSION} --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${CONDA_BASE_IMAGE} -t $(IMAGE_NAME):$(IMAGE_VERSION) .
docker tag $(IMAGE_NAME):$(IMAGE_VERSION) $(IMAGE_NAME)-ubi8:$(IMAGE_VERSION)

.PHONY: build_gpu
build_gpu: get_local_repo
set -x && docker build -f Dockerfile.gpu --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} -t ${GPU_IMAGE_NAME}:${IMAGE_VERSION} .
set -x && docker build -f Dockerfile.gpu --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg CONDA_DOWNLOAD_VERSION=${CONDA_DOWNLOAD_VERSION} -t ${GPU_IMAGE_NAME}:${IMAGE_VERSION} .


tag_base_python:
Expand All @@ -53,7 +56,7 @@ test:

.PHONY: test_local
test_local:
docker build -f Dockerfile.local --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${BASE_IMAGE} -t $(IMAGE_NAME)-candidate .
docker build -f Dockerfile --build-arg PYTHON_VERSION=${PYTHON_VERSION} --build-arg CONDA_VERSION=${CONDA_VERSION} --build-arg BASE_IMAGE=${BASE_IMAGE} -t $(IMAGE_NAME)-candidate .
IMAGE_NAME=$(IMAGE_NAME)-candidate test/run

.PHONY: clean
Expand All @@ -71,7 +74,7 @@ after_build_image_seldon_core_check:


build_conda_base:
docker build -f Dockerfile.conda --build-arg CONDA_VERSION=${CONDA_VERSION} -t ${CONDA_BASE_IMAGE}:${IMAGE_VERSION} .
docker build -f Dockerfile.conda --build-arg CONDA_DOWNLOAD_VERSION=${CONDA_DOWNLOAD_VERSION} -t ${CONDA_BASE_IMAGE}:${IMAGE_VERSION} .

push_to_dockerhub_conda_base:
docker push $(CONDA_BASE_IMAGE):$(IMAGE_VERSION)
4 changes: 2 additions & 2 deletions wrappers/s2i/python/build_scripts/build_all.sh
Expand Up @@ -4,12 +4,12 @@ make -C ../ build_conda_base
# Build standard wrapper images
make -C ../ build PYTHON_VERSION=3.6
make -C ../ build PYTHON_VERSION=3.7.10
make -C ../ build PYTHON_VERSION=3.8.11
make -C ../ build PYTHON_VERSION=3.8.10

# Tag the default image
make -C ../ tag_base_python PYTHON_VERSION=3.7.10

# Build GPU images
make -C ../ build_gpu PYTHON_VERSION=3.6
make -C ../ build_gpu PYTHON_VERSION=3.7.10
make -C ../ build_gpu PYTHON_VERSION=3.8.11
make -C ../ build_gpu PYTHON_VERSION=3.8.10
4 changes: 2 additions & 2 deletions wrappers/s2i/python/build_scripts/push_all.sh
Expand Up @@ -4,12 +4,12 @@ make -C ../ push_to_dockerhub_conda_base
# Push standard wrapper images
make -C ../ push_to_dockerhub PYTHON_VERSION=3.6
make -C ../ push_to_dockerhub PYTHON_VERSION=3.7.10
make -C ../ push_to_dockerhub PYTHON_VERSION=3.8.11
make -C ../ push_to_dockerhub PYTHON_VERSION=3.8.10

# Push default tag image
make -C ../ push_to_dockerhub_base_python PYTHON_VERSION=3.7.10

# Push GPU images
make -C ../ push_gpu_to_dockerhub PYTHON_VERSION=3.6
make -C ../ push_gpu_to_dockerhub PYTHON_VERSION=3.7.10
make -C ../ push_gpu_to_dockerhub PYTHON_VERSION=3.8.11
make -C ../ push_gpu_to_dockerhub PYTHON_VERSION=3.8.10

0 comments on commit d353bb3

Please sign in to comment.