Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -22,21 +22,22 @@ RUN sed -i 's/main/main contrib non-free/' /etc/apt/sources.list && \
|
|
| 22 |
libglib2.0-0 \
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
-
# Install build dependencies
|
| 26 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 27 |
build-essential \
|
| 28 |
python3-dev \
|
| 29 |
-
python3-pip \
|
| 30 |
git \
|
| 31 |
&& rm -rf /var/lib/apt/lists/*
|
| 32 |
|
| 33 |
# Upgrade pip first
|
| 34 |
RUN pip install --no-cache-dir --upgrade pip
|
| 35 |
|
| 36 |
-
#
|
|
|
|
|
|
|
|
|
|
| 37 |
COPY requirements.txt .
|
| 38 |
-
RUN pip install --no-cache-dir
|
| 39 |
-
pip install --no-cache-dir -r requirements.txt
|
| 40 |
|
| 41 |
# Copy app code
|
| 42 |
COPY . .
|
|
|
|
| 22 |
libglib2.0-0 \
|
| 23 |
&& rm -rf /var/lib/apt/lists/*
|
| 24 |
|
| 25 |
+
# Install build dependencies
|
| 26 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 27 |
build-essential \
|
| 28 |
python3-dev \
|
|
|
|
| 29 |
git \
|
| 30 |
&& rm -rf /var/lib/apt/lists/*
|
| 31 |
|
| 32 |
# Upgrade pip first
|
| 33 |
RUN pip install --no-cache-dir --upgrade pip
|
| 34 |
|
| 35 |
+
# Install PyTorch with CUDA 11.8 support first
|
| 36 |
+
RUN pip install --no-cache-dir torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
|
| 37 |
+
|
| 38 |
+
# Copy and install remaining requirements
|
| 39 |
COPY requirements.txt .
|
| 40 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 41 |
|
| 42 |
# Copy app code
|
| 43 |
COPY . .
|