Skip to content

Commit

Permalink
Fix up all base-python-minimal references and C/C++ version naming
Browse files Browse the repository at this point in the history
 * Let's use the concrete compiler version instead of abstract lang versions

 * Fix some missed filename changes
  • Loading branch information
achimnol committed Nov 6, 2017
1 parent b09e087 commit 50fd879
Show file tree
Hide file tree
Showing 27 changed files with 47 additions and 38 deletions.
21 changes: 14 additions & 7 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import subprocess
from pathlib import Path

auto_push = False


def run(shellcmd):
return subprocess.run(shellcmd, shell=True, check=True)
Expand All @@ -28,11 +30,17 @@ def build_kernel(name, tag, extra_opts='', *, latest=False, squash=False):
run(f'docker build -t lablup/kernel-{name}:{tag} {extra_opts} -f {name}/Dockerfile.{tag} {sq} {name}')
if latest:
run(f'docker tag lablup/kernel-{name}:{tag} lablup/kernel-{name}:latest')
if auto_push:
run(f'docker push lablup/kernel-{name}:{tag}')
if latest:
run(f'docker push lablup/kernel-{name}:latest')


def build_common(name, tag, extra_opts=''):
print_header(f'Building common.{name}:{tag}')
run(f'docker build -t lablup/common-{name}:{tag} {extra_opts} -f commons/Dockerfile.{name}.{tag} commons')
if auto_push:
run(f'docker push lablup/common-{name}:{tag}')



Expand All @@ -50,12 +58,11 @@ def build_common(name, tag, extra_opts=''):
# TODO: (kernel-runner update required) build_kernel('python', '2.7-debian', squash=True, latest=True)

build_kernel('git', 'alpine', latest=True)
build_kernel('c', '11-alpine', latest=True)
build_kernel('cpp', '14-alpine', latest=True)
build_kernel('java', '9-alpine', latest=True)
build_kernel('java', '8-alpine')
build_kernel('rust', '1.17-alpine', latest=True)
build_kernel('go', '1.9-alpine', latest=True)
build_kernel('c', 'gcc6.3-alpine', latest=True)
build_kernel('cpp', 'gcc6.3-alpine', latest=True)
build_kernel('java', '8-alpine', latest=True)
build_kernel('rust', '1.17-alpine', latest=True)
build_kernel('go', '1.9-alpine', latest=True)
build_kernel('go', '1.8-alpine')
build_kernel('haskell', 'ghc8.2-debian', latest=True)
build_kernel('lua', '5.3-alpine', latest=True)
Expand Down Expand Up @@ -109,6 +116,6 @@ def build_common(name, tag, extra_opts=''):
build_common('tensorflow', '1.3-py36-dense-gpu')

build_kernel('python-tensorflow', '1.4-py36-dense')
build_kernel('python-tensorflow', '1.4-py36-dense-gpu', latest=True)
build_kernel('python-tensorflow', '1.4-py36-dense-gpu')
build_kernel('python-tensorflow', '1.3-py36-dense')
build_kernel('python-tensorflow', '1.3-py36-dense-gpu')
2 changes: 1 addition & 1 deletion c/Dockerfile.11-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install minimal C compile environments
RUN apk add --no-cache build-base
Expand Down
2 changes: 1 addition & 1 deletion cpp/Dockerfile.14-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install minimal C++ compile environments
RUN apk add --no-cache build-base libstdc++
Expand Down
4 changes: 2 additions & 2 deletions git/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM lablup/kernel-base-python3-wheels:alpine as wheel-builds
FROM lablup/kernel-base-python-wheels:3.6-alpine as wheel-builds
RUN ls -lh /root


# -------------------
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install Git extras and some Python packages
RUN apk add --no-cache --virtual .sorna-deps \
Expand Down
2 changes: 1 addition & 1 deletion go/Dockerfile.1.8-alpine
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.8-alpine3.6 as go-binary


FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install Go environments
COPY --from=go-binary /usr/local/go /usr/local/
Expand Down
2 changes: 1 addition & 1 deletion go/Dockerfile.1.9-alpine
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.9-alpine3.6 as go-binary


FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install Go environments
COPY --from=go-binary /usr/local/go /usr/local/
Expand Down
2 changes: 1 addition & 1 deletion haskell/Dockerfile.ghc8.2-debian
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Ref: https://github.com/freebroccolo/docker-haskell/blob/master/8.2/Dockerfile
FROM lablup/kernel-base-python3-minimal:debian
FROM lablup/kernel-base-python-minimal:3.6-debian

RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 && \
Expand Down
4 changes: 3 additions & 1 deletion java/Dockerfile → java/Dockerfile.8-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install Java compile environments
# ref: https://github.com/docker-library/openjdk/blob/master/8-jdk/alpine/Dockerfile
Expand Down Expand Up @@ -29,3 +29,5 @@ LABEL io.sorna.features "batch query uid-match"

CMD ["/home/sorna/jail", "-policy", "/home/sorna/policy.yml", \
"/usr/local/bin/python", "-m", "ai.backend.kernel", "java"]

# vim: ft=dockerfile
2 changes: 1 addition & 1 deletion julia/Dockerfile.0.6-debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:debian
FROM lablup/kernel-base-python-minimal:3.6-debian

# Install pre-build matplotlib
RUN install_packages gcc g++ \
Expand Down
2 changes: 1 addition & 1 deletion lua/Dockerfile.5.1-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

ENV LUA_VERSION 5.1
ENV LUA_PACKAGE lua${LUA_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion lua/Dockerfile.5.2-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

ENV LUA_VERSION 5.2
ENV LUA_PACKAGE lua${LUA_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion lua/Dockerfile.5.3-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

ENV LUA_VERSION 5.3
ENV LUA_PACKAGE lua${LUA_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion nodejs/Dockerfile.6-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

LABEL io.sorna.envs.corecount="NPROC"

Expand Down
2 changes: 1 addition & 1 deletion php/Dockerfile.7-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install PHP 7.1
RUN apk add --no-cache --virtual .build-deps build-base pkgconf autoconf automake \
Expand Down
4 changes: 2 additions & 2 deletions python-caffe/Dockerfile.1.0-py36
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-python3:debian as caffe-builder
FROM lablup/kernel-python:3.6-debian as caffe-builder

# Build caffe
RUN install_packages \
Expand Down Expand Up @@ -34,7 +34,7 @@ RUN cd /root; pip wheel "leveldb>=0.191"
ENV PYTHONPATH=/home/sorna/caffe-install/python:.


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install Caffe dependencies
RUN install_packages \
Expand Down
4 changes: 2 additions & 2 deletions python-caffe/Dockerfile.1.0-py36-gpu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-python3:debian as caffe-builder
FROM lablup/kernel-python:3.6-debian as caffe-builder

# Build caffe
RUN install_packages \
Expand Down Expand Up @@ -34,7 +34,7 @@ RUN cd /root; pip wheel "leveldb>=0.191"
ENV PYTHONPATH=/home/sorna/caffe-install/python:.


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install Caffe dependencies
RUN install_packages \
Expand Down
2 changes: 1 addition & 1 deletion python-tensorflow/Dockerfile.1.3-py36-dense
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM lablup/common-tensorflow:1.3-py36-dense as tf-binary


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install TensorFlow and Keras
COPY --from=tf-binary /tmp/tensorflow_pkg/tensorflow-*.whl /tmp
Expand Down
2 changes: 1 addition & 1 deletion python-tensorflow/Dockerfile.1.3-py36-dense-gpu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM lablup/common-tensorflow:1.3-py36-dense-gpu as tf-binary
FROM lablup/common-cuda:cuda8.0-cudnn6.0 as cuda-libs


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install CUDA
COPY --from=cuda-libs /usr/local/cuda-8.0 /usr/local/cuda-8.0
Expand Down
2 changes: 1 addition & 1 deletion python-tensorflow/Dockerfile.1.4-py36-dense
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM lablup/common-tensorflow:1.4-py36-dense as tf-binary


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install TensorFlow and Keras
COPY --from=tf-binary /tmp/tensorflow_pkg/tensorflow-*.whl /tmp
Expand Down
2 changes: 1 addition & 1 deletion python-tensorflow/Dockerfile.1.4-py36-dense-gpu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM lablup/common-tensorflow:1.4-py36-dense-gpu as tf-binary
FROM lablup/common-cuda:cuda8.0-cudnn6.0 as cuda-libs


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install CUDA
COPY --from=cuda-libs /usr/local/cuda-8.0 /usr/local/cuda-8.0
Expand Down
2 changes: 1 addition & 1 deletion python-torch/Dockerfile.0.2-py36
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install TensorFlow and Keras
RUN pip install --no-cache-dir \
Expand Down
2 changes: 1 addition & 1 deletion python-torch/Dockerfile.0.2-py36-gpu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM lablup/common-cuda:cuda8.0-cudnn6.0 as cuda-libs


FROM lablup/kernel-python3:debian
FROM lablup/kernel-python:3.6-debian

# Install CUDA
COPY --from=cuda-libs /usr/local/cuda-8.0 /usr/local/cuda-8.0
Expand Down
4 changes: 2 additions & 2 deletions python/Dockerfile.2.7-alpine
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM lablup/kernel-base-python2-wheels:alpine as wheel-builds
FROM lablup/kernel-base-python-wheels:2.7-alpine as wheel-builds
RUN ls -lh /root


# -------------------
FROM lablup/kernel-base-python2-minimal:alpine
FROM lablup/kernel-base-python-minimal:2.7-alpine

# Install system packages for wheels
RUN apk add --no-cache --virtual .sorna-deps \
Expand Down
4 changes: 2 additions & 2 deletions python/Dockerfile.3.6-alpine
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM lablup/kernel-base-python3-wheels:alpine as wheel-builds
FROM lablup/kernel-base-python-wheels:3.6-alpine as wheel-builds
RUN ls -lh /root


# -------------------
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install system packages for wheels
RUN apk add --no-cache --virtual .sorna-deps \
Expand Down
2 changes: 1 addition & 1 deletion python/Dockerfile.3.6-debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:debian
FROM lablup/kernel-base-python-minimal:3.6-debian

# As we mostly have "manylinux" glibc-compatible binary packaes,
# we don't have to rebuild these!
Expand Down
2 changes: 1 addition & 1 deletion r/Dockerfile.3.3-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install dependencies for R package installation
RUN apk update && apk add --no-cache gcc g++ make
Expand Down
2 changes: 1 addition & 1 deletion rust/Dockerfile.1.17-alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM lablup/kernel-base-python3-minimal:alpine
FROM lablup/kernel-base-python-minimal:3.6-alpine

# Install minimal Rust compile environments
# (TODO: this is hold back to 1.17... we need to build newer version!)
Expand Down

0 comments on commit 50fd879

Please sign in to comment.