-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (19 loc) · 874 Bytes
/
Dockerfile
File metadata and controls
22 lines (19 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# run this i.e. with
# docker build -t susi_api .
# docker run -d -p 8080:8080 --name susi_api susi_api
# docker run -d -p 8080:8080 -e OPENAI_API_KEY=<apikey> --name susi_api susi_api
FROM python:3.11-slim
ENV DEBIAN_FRONTEND noninteractive
ARG default_branch=master
COPY requirements.txt /app/
COPY src/ ./app/src/
WORKDIR /app
RUN \
apt-get update && apt-get install -y ca-certificates bash ffmpeg net-tools sysstat procps && \
export PYTHONHTTPSVERIFY=0 && \
pip3 install --upgrade pip && \
pip3 install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --no-cache-dir -r requirements.txt && \
python3 -W ignore -c "import whisper; whisper.load_model('tiny'); whisper.load_model('base')" && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
EXPOSE 8080
CMD ["python3", "src/main.py"]