@@ -4,6 +4,8 @@ ARG BASE_IMAGE=ubuntu:22.04
4
4
# extras or core
5
5
FROM ${BASE_IMAGE} as requirements-core
6
6
7
+ USER root
8
+
7
9
ARG GO_VERSION=1.21.7
8
10
ARG BUILD_TYPE
9
11
ARG CUDA_MAJOR_VERSION=11
@@ -21,7 +23,7 @@ RUN apt-get update && \
21
23
apt-get install -y ca-certificates curl patch pip cmake git && apt-get clean
22
24
23
25
# Install Go
24
- RUN curl -L -s https://go.dev/dl/go$GO_VERSION.linux-$TARGETARCH.tar.gz | tar -v - C /usr/local -xz
26
+ RUN curl -L -s https://go.dev/dl/go$GO_VERSION.linux-$TARGETARCH.tar.gz | tar -C /usr/local -xz
25
27
ENV PATH $PATH:/usr/local/go/bin
26
28
27
29
COPY --chmod=644 custom-ca-certs/* /usr/local/share/ca-certificates/
@@ -79,6 +81,10 @@ RUN pip install --upgrade pip
79
81
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
80
82
RUN apt-get install -y espeak-ng espeak && apt-get clean
81
83
84
+ RUN if [ ! -e /usr/bin/python ]; then \
85
+ ln -s /usr/bin/python3 /usr/bin/python \
86
+ ; fi
87
+
82
88
# ##################################
83
89
# ##################################
84
90
@@ -166,43 +172,43 @@ COPY --from=builder /build/backend-assets/grpc/stablediffusion ./backend-assets/
166
172
167
173
# # Duplicated from Makefile to avoid having a big layer that's hard to push
168
174
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
169
- PATH=$PATH:/opt/conda/bin make -C backend/python/autogptq \
175
+ make -C backend/python/autogptq \
170
176
; fi
171
177
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
172
- PATH=$PATH:/opt/conda/bin make -C backend/python/bark \
178
+ make -C backend/python/bark \
173
179
; fi
174
180
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
175
- PATH=$PATH:/opt/conda/bin make -C backend/python/diffusers \
181
+ make -C backend/python/diffusers \
176
182
; fi
177
183
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
178
- PATH=$PATH:/opt/conda/bin make -C backend/python/vllm \
184
+ make -C backend/python/vllm \
179
185
; fi
180
186
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
181
- PATH=$PATH:/opt/conda/bin make -C backend/python/mamba \
187
+ make -C backend/python/mamba \
182
188
; fi
183
189
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
184
- PATH=$PATH:/opt/conda/bin make -C backend/python/sentencetransformers \
190
+ make -C backend/python/sentencetransformers \
185
191
; fi
186
192
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
187
- PATH=$PATH:/opt/conda/bin make -C backend/python/transformers \
193
+ make -C backend/python/transformers \
188
194
; fi
189
195
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
190
- PATH=$PATH:/opt/conda/bin make -C backend/python/vall-e-x \
196
+ make -C backend/python/vall-e-x \
191
197
; fi
192
198
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
193
- PATH=$PATH:/opt/conda/bin make -C backend/python/exllama \
199
+ make -C backend/python/exllama \
194
200
; fi
195
201
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
196
- PATH=$PATH:/opt/conda/bin make -C backend/python/exllama2 \
202
+ make -C backend/python/exllama2 \
197
203
; fi
198
204
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
199
- PATH=$PATH:/opt/conda/bin make -C backend/python/petals \
205
+ make -C backend/python/petals \
200
206
; fi
201
207
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
202
- PATH=$PATH:/opt/conda/bin make -C backend/python/transformers-musicgen \
208
+ make -C backend/python/transformers-musicgen \
203
209
; fi
204
210
RUN if [ "${IMAGE_TYPE}" = "extras" ]; then \
205
- PATH=$PATH:/opt/conda/bin make -C backend/python/coqui \
211
+ make -C backend/python/coqui \
206
212
; fi
207
213
208
214
# Make sure the models directory exists
0 commit comments