indic-asr / Dockerfile
Darshan
use different setup
2574638
raw
history blame
1.17 kB
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV LANG=C.UTF-8
# Set working directory
WORKDIR /app
# Install system dependencies
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/*
# Upgrade pip
RUN python3.10 -m pip install --upgrade pip setuptools wheel
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Clone and install NeMo
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 application code
COPY app.py ./app.py
# Create directory for temporary files
RUN mkdir -p /tmp/audio_files
# Expose port
EXPOSE 8000
# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]