Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions docker/modelzooserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# NOTE: The docker build context directory must be the root of the source tree.
# NOTE: To build the release image, SQLFlow must be built into ./build
FROM ubuntu:18.04
FROM alpine:3.12

ARG FIND_FASTED_MIRROR=true

# Choose faster mirrors for apt-get and pip
# Choose faster mirrors for alpine and pip
# Install docker.io to release model defininiation
COPY docker/dev/find_fastest_resources.sh /usr/local/bin/
RUN bash -c 'if [ "$FIND_FASTED_MIRROR" == "true" ]; then source find_fastest_resources.sh && \
echo "Choose the fastest APT source ..." && \
choose_fastest_apt_source; fi' && \
apt-get -qq update && \
apt-get -qq install -y axel sudo docker.io
RUN /bin/sh -c 'if [ "$FIND_FASTED_MIRROR" == "true" ]; then source find_fastest_resources.sh && \
echo "Choose the fastest Alpine source ..." && \
choose_fastest_alpine_source && \
echo "Choose the fastest PIP source ..." && \
choose_fastest_pip_source && \
apk add --no-cache python3 py3-pip sudo bash docker-cli && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub http://cdn.sqlflow.tech/alpine/sgerrand.rsa.pub.txt && \
wget -q http://cdn.sqlflow.tech/alpine/glibc-2.31-r0.apk && \
apk add glibc-2.31-r0.apk && \
rm glibc-2.31-r0.apk && \
ln -s /usr/bin/python3 /usr/local/bin/python && \
ln -s /usr/bin/pip3 /usr/local/bin/pi; fi'

# Install pre-built SQLFlow components.
COPY build/modelzooserver /usr/local/bin/modelzooserver
Expand Down