forked from opea-project/GenAIComps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (20 loc) · 805 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
FROM python:3.11-slim
RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
chown -R user /home/user/
USER user
ENV LANG=C.UTF-8
ARG ARCH=cpu
COPY comps /home/user/comps
RUN pip install --no-cache-dir --upgrade pip && \
if [ "${ARCH}" = "cpu" ]; then \
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \
pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/asr/whisper/requirements.txt ; \
else \
pip install --no-cache-dir -r /home/user/comps/asr/whisper/requirements.txt ; \
fi
ENV PYTHONPATH=$PYTHONPATH:/home/user
WORKDIR /home/user/comps/asr/whisper
ENTRYPOINT ["python", "asr.py"]