update cpu dockerfile with python-slim-buster base image
This commit is contained in:
+6
-27
@@ -1,45 +1,24 @@
|
|||||||
FROM ubuntu:focal
|
FROM python:3.8-slim-buster
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# Remove any third-party apt sources to avoid issues with expiring keys.
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
RUN rm -f /etc/apt/sources.list.d/*.list
|
|
||||||
|
|
||||||
# Install some basic utilities.
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
sudo \
|
sudo \
|
||||||
git \
|
git \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
libx11-6 \
|
libx11-6 \
|
||||||
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN apt update
|
|
||||||
|
|
||||||
# install python
|
|
||||||
RUN apt install software-properties-common -y && \
|
|
||||||
add-apt-repository ppa:deadsnakes/ppa && \
|
|
||||||
apt update
|
|
||||||
|
|
||||||
RUN apt install python3-dev -y && \
|
|
||||||
apt install python-is-python3
|
|
||||||
|
|
||||||
|
|
||||||
# install pip
|
|
||||||
RUN apt install python3-pip -y
|
|
||||||
|
|
||||||
# Create a working directory.
|
|
||||||
RUN mkdir /app
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY scripts/setup.sh /app
|
COPY scripts/setup.sh requirements/server.txt /app/
|
||||||
COPY requirements/ /app
|
|
||||||
|
|
||||||
RUN bash setup.sh
|
RUN apt update && bash setup.sh && pip install -r server.txt
|
||||||
RUN pip install -r server.txt
|
|
||||||
|
|
||||||
COPY whisper_live /app/whisper_live
|
COPY whisper_live /app/whisper_live
|
||||||
|
|
||||||
COPY run_server.py /app
|
COPY run_server.py /app
|
||||||
|
|
||||||
CMD ["python", "run_server.py"]
|
CMD ["python", "run_server.py"]
|
||||||
|
|||||||
Reference in New Issue
Block a user