Fix docker build?

This commit is contained in:
Brandon Thomas
2023-07-18 04:48:42 -04:00
parent 0f3f56b51a
commit f29a7194ee
3 changed files with 52 additions and 8 deletions
@@ -5,3 +5,9 @@ __pycache__
hubert_base.pt
/logs
.venv
# NB(bt): Local testing
python/
inputs/
outputs/
+40 -7
View File
@@ -1,13 +1,46 @@
# syntax=docker/dockerfile:1
FROM python:3.10-bullseye
#FROM python:3.10-bullseye
FROM nvidia/cuda:12.0.1-runtime-ubuntu22.04
EXPOSE 7865
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
# NB: ffmpeg for transcoding opus -> wav
# NB(bt,2023-05-04): Installing lsof, htop, ripgrep, and other debugging tools
# NB(bt,2023-05-04): Installing rsync to monitor time it takes for files to sync
RUN apt-get update && apt-get install -y \
build-essential \
curl \
ffmpeg \
htop \
libsndfile1 \
lsof \
nvidia-driver-515 \
python3-pip \
python3.10 \
python3.10-dev \
python3.10-venv \
ripgrep \
rsync \
vim \
wget \
--no-install-recommends \
&& apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/{apt,dpkg,cache,log}/
RUN mkdir /python_install
RUN mkdir /model_code
WORKDIR /python_install
COPY requirements.txt .
# NB: Kubernetes will copy over the venv we create here.
RUN python3 -m venv python \
&& . python/bin/activate \
&& pip install wheel \
&& pip install -r requirements.txt
# NB: The model code is uploaded next
WORKDIR /model_code
COPY . .
RUN pip3 install -r requirements.txt
CMD ["python3", "infer-web.py"]
@@ -36,7 +36,12 @@ absl-py>=1.2.0
audioread
uvicorn>=0.21.1
colorama>=0.4.5
pyworld>=0.3.2
# NB(bt, 2023-07-18): This issue literally just cropped up with PyWorld:
# Docker images were building yesterday, but not today. Downgrade
# pyworld>=0.3.2 to pyworld==0.3.2. (Granted, 0.3.3 was released back in
# April.)
# https://github.com/gitmylo/audio-webui/issues/78
pyworld==0.3.2
httpx==0.23.0
#onnxruntime-gpu
torchcrepe==0.0.20