File size: 1,167 Bytes
fdf3e46
 
 
 
 
 
a853668
1f89c40
 
 
a853668
 
fdf3e46
 
 
1f89c40
 
fdf3e46
 
 
1f89c40
fdf3e46
 
 
1f89c40
a853668
fdf3e46
2574638
fdf3e46
1f89c40
 
 
 
 
a853668
1f89c40
a853668
 
fdf3e46
b2c0211
 
a853668
1f89c40
f06efb1
a853668
1f89c40
 
c149546
1f89c40
 
a853668
1f89c40
f06efb1
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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"]