@@ -3,7 +3,7 @@ ARG BASE_IMAGE=ubuntu:22.04
3
3
ARG GRPC_BASE_IMAGE=${BASE_IMAGE}
4
4
5
5
# extras or core
6
- FROM ${BASE_IMAGE} as requirements-core
6
+ FROM ${BASE_IMAGE} AS requirements-core
7
7
8
8
USER root
9
9
@@ -24,7 +24,7 @@ RUN apt-get update && \
24
24
apt-get install -y ca-certificates curl python3-pip unzip && apt-get clean
25
25
26
26
# Install Go
27
- RUN curl -L -s https://go.dev/dl/go$GO_VERSION.linux-$TARGETARCH.tar.gz | tar -C /usr/local -xz
27
+ RUN curl -L -s https://go.dev/dl/go${ GO_VERSION} .linux-${ TARGETARCH} .tar.gz | tar -C /usr/local -xz
28
28
ENV PATH $PATH:/usr/local/go/bin
29
29
30
30
# Install grpc compilers
@@ -80,7 +80,7 @@ RUN test -n "$TARGETARCH" \
80
80
# ##################################
81
81
# ##################################
82
82
83
- FROM requirements-core as requirements-extras
83
+ FROM requirements-core AS requirements-extras
84
84
85
85
RUN apt install -y gpg && \
86
86
curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \
@@ -105,7 +105,7 @@ RUN if [ ! -e /usr/bin/python ]; then \
105
105
# ##################################
106
106
# ##################################
107
107
108
- FROM ${GRPC_BASE_IMAGE} as grpc
108
+ FROM ${GRPC_BASE_IMAGE} AS grpc
109
109
110
110
ARG MAKEFLAGS
111
111
ARG GRPC_VERSION=v1.58.0
@@ -121,16 +121,15 @@ RUN apt-get update && \
121
121
122
122
RUN git clone --recurse-submodules --jobs 4 -b ${GRPC_VERSION} --depth 1 --shallow-submodules https://github.com/grpc/grpc
123
123
124
- RUN cd grpc && \
125
- mkdir -p cmake/build && \
126
- cd cmake/build && \
127
- cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF ../.. && \
124
+ WORKDIR /build/grpc/cmake/build
125
+
126
+ RUN cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF ../.. && \
128
127
make
129
128
130
129
# ##################################
131
130
# ##################################
132
131
133
- FROM requirements-${IMAGE_TYPE} as builder
132
+ FROM requirements-${IMAGE_TYPE} AS builder
134
133
135
134
ARG GO_TAGS="stablediffusion tts"
136
135
ARG GRPC_BACKENDS
@@ -168,9 +167,11 @@ RUN GRPC_BACKENDS=backend-assets/grpc/stablediffusion make build
168
167
169
168
COPY --from=grpc /build/grpc ./grpc/
170
169
171
- RUN cd /build/grpc/cmake/build && make install
170
+ WORKDIR /build/grpc/cmake/build
171
+ RUN make install
172
172
173
173
# Rebuild with defaults backends
174
+ WORKDIR /build
174
175
RUN make build
175
176
176
177
RUN if [ ! -d "/build/sources/go-piper/piper-phonemize/pi/lib/" ]; then \
@@ -288,7 +289,7 @@ RUN mkdir -p /build/models
288
289
289
290
# Define the health check command
290
291
HEALTHCHECK --interval=1m --timeout=10m --retries=10 \
291
- CMD curl -f $HEALTHCHECK_ENDPOINT || exit 1
292
+ CMD curl -f ${ HEALTHCHECK_ENDPOINT} || exit 1
292
293
293
294
VOLUME /build/models
294
295
EXPOSE 8080
0 commit comments