mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 09:05:17 -07:00
Update Dockerfile to install Python 3.12 venv and bootstrap pip
- Replaced python3-pip with python3.12-venv in the installation process. - Added commands to ensure pip is upgraded and installed after setting Python 3.12 as the default. - Streamlined the installation of PyTorch by removing redundant pip upgrade command.
This commit is contained in:
+6
-5
@@ -15,15 +15,17 @@ RUN apt-get update && apt-get install -y \
|
|||||||
&& apt-get update && apt-get install -y \
|
&& apt-get update && apt-get install -y \
|
||||||
python3.12 \
|
python3.12 \
|
||||||
python3.12-dev \
|
python3.12-dev \
|
||||||
python3-pip \
|
python3.12-venv \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
curl \
|
curl \
|
||||||
tzdata \
|
tzdata \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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 && \
|
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
|
||||||
COPY backend/ /app/backend/
|
COPY backend/ /app/backend/
|
||||||
@@ -33,8 +35,7 @@ COPY providers/ /app/providers/
|
|||||||
COPY web/dist/ /app/web/dist/
|
COPY web/dist/ /app/web/dist/
|
||||||
|
|
||||||
# Install PyTorch with CUDA support first
|
# Install PyTorch with CUDA support first
|
||||||
RUN python -m pip install --upgrade pip && \
|
RUN pip install --no-cache-dir \
|
||||||
pip install --no-cache-dir \
|
|
||||||
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
||||||
|
|
||||||
# Install remaining dependencies
|
# Install remaining dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user