| FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04 |
|
|
| |
| 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 \ |
| TRANSFORMERS_CACHE=/app/models \ |
| TRITON_CACHE_DIR=/tmp/triton_cache \ |
| XDG_CACHE_HOME=/tmp \ |
| NUMBA_CACHE_DIR=/tmp/numba_cache |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| software-properties-common \ |
| && add-apt-repository ppa:deadsnakes/ppa \ |
| && apt-get update \ |
| && apt-get install -y --no-install-recommends \ |
| python3.10 \ |
| python3.10-pip \ |
| python3.10-dev \ |
| python3.10-distutils \ |
| build-essential \ |
| git \ |
| ffmpeg \ |
| libsndfile1 \ |
| curl \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN ln -sf /usr/bin/python3.10 /usr/bin/python3 \ |
| && ln -sf /usr/bin/python3.10 /usr/bin/python |
|
|
| |
| RUN python3 -m pip install --upgrade pip setuptools wheel uv |
|
|
| WORKDIR /app |
|
|
| |
| RUN mkdir -p /tmp/numba_cache /tmp/triton_cache /app/models && \ |
| chown -R nobody:nogroup /tmp/numba_cache /tmp/triton_cache /app/models && \ |
| chmod -R 755 /tmp/numba_cache /tmp/triton_cache /app/models |
|
|
| COPY requirements.txt . |
|
|
| |
| RUN python3 -m uv pip install -r requirements.txt --prerelease=allow |
| RUN python3 -m nltk.downloader punkt punkt_tab |
|
|
| COPY . . |
|
|
| EXPOSE 8000 |
|
|
| CMD ["python3", "newstartup.py"] |