File size: 938 Bytes
7ed5306 |
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 |
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
DEBIAN_FRONTEND=noninteractive \
CUDA_HOME=/usr/local/cuda \
PATH=/usr/local/cuda/bin:$PATH \
LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH \
NVIDIA_VISIBLE_DEVICES=all \
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
HF_HOME=/app/models
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
build-essential \
git \
ffmpeg \
libsndfile1 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip and install build tools
RUN python3 -m pip install --upgrade pip setuptools wheel uv
WORKDIR /app
COPY requirements.txt .
# Install other requirements
RUN python3 -m uv pip install --no-cache-dir -r requirements.txt --prerelease=allow
COPY . .
EXPOSE 8000
CMD ["python3", "server.py"] |