evBackend / Dockerfile
Jofthomas's picture
Jofthomas HF staff
Update Dockerfile
7f3df49
raw
history blame
860 Bytes
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"]