|
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
ENV PYTHONUNBUFFERED=1 |
|
ENV LANG=C.UTF-8 |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
python3.10 \ |
|
python3.10-dev \ |
|
python3-pip \ |
|
git \ |
|
build-essential \ |
|
cmake \ |
|
gcc \ |
|
g++ \ |
|
libsndfile1 \ |
|
sox \ |
|
libsox-dev \ |
|
libsox-fmt-all \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN python3.10 -m pip install --upgrade pip setuptools wheel |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN git clone https://github.com/AI4Bharat/NeMo.git && \ |
|
cd NeMo && \ |
|
git checkout nemo-v2 && \ |
|
pip install -e . && \ |
|
python3.10 -c "import nltk; nltk.download('punkt')" |
|
|
|
|
|
COPY app.py ./app.py |
|
|
|
|
|
RUN mkdir -p /tmp/audio_files |
|
|
|
|
|
EXPOSE 8000 |
|
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |