Skip to content

Commit f3f2b24

Browse files
authored
Minimize model zoo image (#2777)
* Add model zoo to playground * update indent * Minimize model zoo image * add comment
1 parent 484753f commit f3f2b24

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

docker/modelzooserver/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
# NOTE: The docker build context directory must be the root of the source tree.
22
# NOTE: To build the release image, SQLFlow must be built into ./build
3-
FROM ubuntu:18.04
3+
FROM alpine:3.12
44

55
ARG FIND_FASTED_MIRROR=true
66

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

1623
# Install pre-built SQLFlow components.
1724
COPY build/modelzooserver /usr/local/bin/modelzooserver

0 commit comments

Comments
 (0)