File size: 860 Bytes
acdc607
 
6c0ac6b
acdc607
 
 
 
 
 
 
0d45ab2
7f3df49
acdc607
 
 
 
7f3df49
acdc607
6c0ac6b
40b10b7
692d290
6c0ac6b
9d69895
 
 
692d290
7f3df49
9d69895
acdc607
683e9cd
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
ARG BASE=nvidia/cuda:11.8.0-base-ubuntu22.04
FROM ${BASE}

# Install OS dependencies:
RUN apt-get update && apt-get upgrade -y \
    && apt-get install -y --no-install-recommends \
    gcc g++ \
    make \
    python3 python3-dev python3-pip python3-venv python3-wheel \
    espeak-ng libsndfile1-dev \
    git \
    cuda-toolkit-11-8 \
    && rm -rf /var/lib/apt/lists/*

# Install Major Python Dependencies:
RUN pip3 install llvmlite --ignore-installed \
    && pip3 install torch torchaudio numpy --extra-index-url https://download.pytorch.org/whl/cu118 \
    && rm -rf /root/.cache/pip

# Set the working directory
WORKDIR /app

# Copy all files into the container
COPY . .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]