Skip to content

Commit fd28252

Browse files
committed
fix(Dockerfile): try to save some space
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 94f20e2 commit fd28252

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ENV GALLERIES='[{"name":"model-gallery", "url":"github:go-skynet/model-gallery/i
1919
ARG GO_TAGS="stablediffusion tts"
2020

2121
RUN apt-get update && \
22-
apt-get install -y ca-certificates curl patch pip cmake
22+
apt-get install -y ca-certificates curl patch pip cmake && apt-get clean
2323

2424

2525
# Use the variables in subsequent instructions
@@ -34,17 +34,18 @@ RUN if [ "${BUILD_TYPE}" = "cublas" ]; then \
3434
dpkg -i cuda-keyring_1.0-1_all.deb && \
3535
rm -f cuda-keyring_1.0-1_all.deb && \
3636
apt-get update && \
37-
apt-get install -y cuda-nvcc-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcublas-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcusparse-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcusolver-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} \
37+
apt-get install -y cuda-nvcc-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcublas-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcusparse-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} libcusolver-dev-${CUDA_MAJOR_VERSION}-${CUDA_MINOR_VERSION} && apt-get clean \
3838
; fi
3939
ENV PATH /usr/local/cuda/bin:${PATH}
4040

41-
# OpenBLAS requirements
42-
RUN apt-get install -y libopenblas-dev
43-
44-
# Stable Diffusion requirements
45-
RUN apt-get install -y libopencv-dev && \
46-
ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2
41+
# OpenBLAS requirements and stable diffusion
42+
RUN apt-get install -y \
43+
libopenblas-dev \
44+
libopencv-dev \
45+
&& apt-get clean
4746

47+
# Set up OpenCV
48+
RUN ln -s /usr/include/opencv4/opencv2 /usr/include/opencv2
4849

4950
WORKDIR /build
5051

0 commit comments

Comments
 (0)