diff --git a/Dockerfile.cuda b/Dockerfile.cuda index c03001fa..b7d7ca96 100644 --- a/Dockerfile.cuda +++ b/Dockerfile.cuda @@ -15,15 +15,17 @@ RUN apt-get update && apt-get install -y \ && apt-get update && apt-get install -y \ python3.12 \ python3.12-dev \ - python3-pip \ + python3.12-venv \ ffmpeg \ curl \ tzdata \ && rm -rf /var/lib/apt/lists/* -# Set Python 3.12 as default +# Set Python 3.12 as default and bootstrap pip RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \ - update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 + update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ + python3.12 -m ensurepip --upgrade && \ + python3.12 -m pip install --upgrade pip # Copy backend COPY backend/ /app/backend/ @@ -33,8 +35,7 @@ COPY providers/ /app/providers/ COPY web/dist/ /app/web/dist/ # Install PyTorch with CUDA support first -RUN python -m pip install --upgrade pip && \ - pip install --no-cache-dir \ +RUN pip install --no-cache-dir \ torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 # Install remaining dependencies