aleger commited on
Commit
2745c87
1 Parent(s): a356818

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +63 -0
Dockerfile ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ===========================================
2
+ #
3
+ # THIS IS A GENERATED DOCKERFILE. DO NOT EDIT
4
+ #
5
+ # ===========================================
6
+
7
+ # Block SETUP_BENTO_BASE_IMAGE
8
+ FROM python:3.10-slim as base-container
9
+
10
+ ENV LANG=C.UTF-8
11
+
12
+ ENV LC_ALL=C.UTF-8
13
+
14
+ ENV PYTHONIOENCODING=UTF-8
15
+
16
+ ENV PYTHONUNBUFFERED=1
17
+
18
+
19
+
20
+ USER root
21
+
22
+ ENV DEBIAN_FRONTEND=noninteractive
23
+ RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
24
+ RUN set -eux && \
25
+ apt-get update -y && \
26
+ apt-get install -q -y --no-install-recommends --allow-remove-essential \
27
+ ca-certificates gnupg2 bash build-essential ffmpeg
28
+ # Block SETUP_BENTO_USER
29
+ ARG BENTO_USER=bentoml
30
+ ARG BENTO_USER_UID=1000
31
+ ARG BENTO_USER_GID=1000
32
+ RUN groupadd -g $BENTO_USER_GID -o $BENTO_USER && useradd -m -u $BENTO_USER_UID -g $BENTO_USER_GID -o -r $BENTO_USER
33
+ ENV BENTOML_CONFIG=src/configuration.yaml
34
+ ARG BENTO_PATH=/home/bentoml/bento
35
+ ENV BENTO_PATH=$BENTO_PATH
36
+ ENV BENTOML_HOME=/home/bentoml/
37
+
38
+ RUN mkdir $BENTO_PATH && chown bentoml:bentoml $BENTO_PATH -R
39
+ WORKDIR $BENTO_PATH
40
+
41
+
42
+
43
+ # Block SETUP_BENTO_COMPONENTS
44
+ COPY --chown=bentoml:bentoml ./env/python ./env/python/
45
+ # install python packages with install.sh
46
+ RUN bash -euxo pipefail /home/bentoml/bento/env/python/install.sh
47
+ COPY --chown=bentoml:bentoml . ./
48
+
49
+ # Block SETUP_BENTO_ENTRYPOINT
50
+ RUN rm -rf /var/lib/{apt,cache,log}
51
+ # Default port for BentoServer
52
+ EXPOSE 7860
53
+
54
+ # Expose Prometheus port
55
+ EXPOSE 7861
56
+
57
+ RUN chmod +x /home/bentoml/bento/env/docker/entrypoint.sh
58
+
59
+ USER bentoml
60
+
61
+ ENTRYPOINT [ "/home/bentoml/bento/env/docker/entrypoint.sh" ]
62
+
63
+