| 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 | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| python3 \ | |
| python3-pip \ | |
| python3-dev \ | |
| build-essential \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip and install build tools | |
| RUN python3 -m pip install --upgrade pip setuptools wheel | |
| WORKDIR /app | |
| COPY . . | |
| # Install requirements | |
| RUN pip3 install --no-cache-dir -r requirements.txt | |
| EXPOSE 8000 | |
| CMD ["python3", "server.py"] |